Git Step-7 : 커밋 참조 객체의 특정 노드 접근
커밋 참조 객체의 특정 노드 접근
커밋 객체를 참조하는 branch, tag 등의 참조 객체에 대해서 ~(틸트) 또는 ^(캐럿) 식별자로 특정 커밋 객체에 접근할 수 있는 방법입니다.
(부모 커밋은 왼쪽에서 오른쪽으로 우선시 됩니다.)
G H I J
\ / \ /
D E F
\ | / \
\ | / |
\|/ |
B C
\ /
\ /
A
A = = A^0
B = A^ = A^1 = A~1
C = = A^2
D = A^^ = A^1^1 = A~2
E = B^2 = A^^2
F = B^3 = A^^3
G = A^^^ = A^1^1^1 = A~3
H = D^2 = B^^2 = A^^^2 = A~2^2
I = F^ = B^3^ = A^^3^
J = F^2 = B^3^2 = A^^3^2
참고: https://git-scm.com/docs/revisions
git show-branch
명령으로 위에 값들을 비교해 보세요.
$git show-branch --more=10
* [develop] commit-3 develop
! [feature-sub] commit-3 sub
! [feature-tmp] commit-3 tmp
! [release] 3333
! [stable] Merge branch 'develop' into stable
-----
+ [feature-sub] commit-3 sub
+ [feature-sub^] commit-2 sub
+ [feature-sub~2] commit-1 sub
*+ [develop] commit-3 develop
*+ [develop^] commit-2 develop
*+ [develop~2] commit-1 develop
+ [feature-tmp] commit-3 tmp
+ [feature-tmp^] commit-2 tmp
+ [feature-tmp~2] commit-1 tmp
--- [develop~3] Merge branch 'release' into develop
*+++ [release] 3333
*++ [develop~4] aaaa
*+++ [develop~5] 232
- [stable] Merge branch 'develop' into stable
*++++ [develop~6] modify
*++++ [develop~7] Remove file
*++++ [develop~8] fix bug
----- [develop~9] Merge branch 'feature/server-module' into feature/final-module
----- [develop~9^2] Merge branch 'feature/return-module' into feature/server-module
*++++ [develop~9^2^2] Modify return module
*++++ [develop~9^2^] fix server module
----- [develop~10] Merge branch 'feature/client-module' into feature/final-module
*++++ [develop~10^2] modify client module
*++++ [develop~11] modify final module
*++++ [develop~12] Add final module
$git log --oneline --graph --all
* ecbbe9c (feature-sub) commit-3 sub
* 65ecc14 commit-2 sub
* 378ab22 commit-1 sub
* 27fc591 (HEAD -> develop) commit-3 develop
* 6a6df56 commit-2 develop
* 336501f commit-1 develop
| * b703c62 (feature-tmp) commit-3 tmp
| * 1ac353d commit-2 tmp
| * 05247d2 commit-1 tmp
|/
* 96c1620 Merge branch 'release' into develop
|\
| * 47e88da (release) 3333
* | 0e6625b aaaa
|/
* cd77c85 232
| * fbdc1a8 (stable) Merge branch 'develop' into stable
| |\
| |/
|/|
* | 3deca09 modify
* | 6456e80 Remove file
|/
* b798cf3 (tag: v1.0.2, origin/stable, origin/release, origin/develop) fix bug
* 2aeff03 Merge branch 'feature/server-module' into feature/final-module
|\
| * 87cdfd3 Merge branch 'feature/return-module' into feature/server-module
| |\
| | * b0351b1 Modify return module
| | * 2dc0357 Add return module
| * | b708513 fix server module
* | | 65e1dd2 Merge branch 'feature/client-module' into feature/final-module
|\ \ \
| * | | 71f769a modify client module
| * | | d65c213 Add Client Main
| * | | a45a946 Add Server Main
| * | | 8da8bac Add Break Module
* | | | a101b2d modify final module
* | | | 0ae71cf Add final module
댓글남기기