DEVIEW 2013 - Git은 어떻게 동작하는가20. $ git init
$ echo Hello a.txt
$ echo World b.txt
# 저장소를 만든다.
Git Repository (non-bare)
Working Directory (.)
a.txt
“Hello”
b.txt
Object Database
(.git/objects/)
“World”
Refs (.git/)
저장소와 커밋
$ cat .git/HEAD
refs: refs/heads/master
13년 10월 17일 목요일
HEAD
master
bad default
revision
21. $ git add a.txt
$ git add b.txt
Git Repository (non-bare)
Working Directory (.)
a.txt
b.txt
“Hello”
“World”
Index (.git/index)
a.txt
e965
b.txt
216e
Object Database
(.git/objects/)
blob e965
Refs (.git/)
bad default
revision
HEAD
“Hello”
blob 216e
master
“World”
.git/objects/
21/6e97ce08229b8776d3feb731c6d23a2f669ac8
13년 10월 17일 목요일
22. $ git commit -m ‘Add a.txt and b.txt’
Git Repository (non-bare)
Working Directory (.)
a.txt
b.txt
“Hello”
“World”
Index (.git/index)
a.txt
b.txt
13년 10월 17일 목요일
e965
216e
Object Database
(.git/objects/)
blob e965
Refs (.git/)
HEAD
“Hello”
blob 216e
“World”
master
bad default
revision
23. $ git commit -m ‘Add a.txt and b.txt’
bad default
revision
Git Repository (non-bare)
Working Directory (.)
a.txt
“Hello”
b.txt
Object Database
(.git/objects/)
“World”
e965
b.txt
216e
tree 9d1c
master
tree
9d1c
blob e965
blob e965 a.txt
...저자 등등...
“Hello”
blob 216e b.txt
“Add a.txt and b.txt”
blob 216e
“World”
13년 10월 17일 목요일
HEAD
commit 73d3
Index (.git/index)
a.txt
Refs (.git/)
24. $ echo HELLO a.txt
Git Repository (non-bare)
Working Directory (.)
a.txt
“Hello”
b.txt
Refs (.git/)
HEAD
Object Database
(.git/objects/)
“World”
commit 73d3
tree 9d1c
Index (.git/index)
a.txt
e965
b.txt
216e
tree
9d1c
blob e965
blob e965 a.txt
...저자 등등...
“Hello”
blob 216e b.txt
“Add a.txt and b.txt”
blob 216e
“World”
13년 10월 17일 목요일
master
25. $ echo HELLO a.txt
Git Repository (non-bare)
Working Directory (.)
a.txt
“HELLO”
b.txt
Refs (.git/)
HEAD
Object Database
(.git/objects/)
“World”
commit 73d3
tree 9d1c
Index (.git/index)
a.txt
e965
b.txt
216e
tree
9d1c
blob e965
blob e965 a.txt
...저자 등등...
“Hello”
blob 216e b.txt
“Add a.txt and b.txt”
blob 216e
“World”
13년 10월 17일 목요일
master
26. $ echo HELLO a.txt
$ git add a.txt
Git Repository (non-bare)
Working Directory (.)
a.txt
“HELLO”
b.txt
Refs (.git/)
HEAD
Object Database
(.git/objects/)
“World”
commit 73d3
tree 9d1c
Index (.git/index)
a.txt
e965
b.txt
216e
tree
9d1c
blob e965
blob e965 a.txt
...저자 등등...
“Hello”
blob 216e b.txt
“Add a.txt and b.txt”
blob 216e
“World”
13년 10월 17일 목요일
master
27. $ echo HELLO a.txt
$ git add a.txt
Git Repository (non-bare)
Working Directory (.)
a.txt
“HELLO”
b.txt
Refs (.git/)
HEAD
Object Database
(.git/objects/)
master
“World”
Index (.git/index)
a.txt
e965
b.txt
blob e427
216e
“HELLO”
commit 73d3
tree 9d1c
tree
9d1c
blob e965
blob e965 a.txt
...저자 등등...
“Hello”
blob 216e b.txt
“Add a.txt and b.txt”
blob 216e
“World”
13년 10월 17일 목요일
28. $ echo HELLO a.txt
$ git add a.txt
Git Repository (non-bare)
Working Directory (.)
a.txt
“HELLO”
b.txt
Refs (.git/)
HEAD
Object Database
(.git/objects/)
master
“World”
Index (.git/index)
blob e427
a.txt
e427
“HELLO”
b.txt
216e
commit 73d3
tree 9d1c
tree
9d1c
blob e965
blob e965 a.txt
...저자 등등...
“Hello”
blob 216e b.txt
“Add a.txt and b.txt”
blob 216e
“World”
13년 10월 17일 목요일
29. $ echo HELLO a.txt
$ git add a.txt
$ git commit -m ‘Update a.txt’
Git Repository (non-bare)
Working Directory (.)
a.txt
“HELLO”
b.txt
a.txt
e427
b.txt
HEAD
Object Database
(.git/objects/)
“World”
Index (.git/index)
Refs (.git/)
tree 06d2
blob e427
blob e427 a.txt
“HELLO”
blob 216e b.txt
216e
master
commit 8511
tree
06d2
parent
73d3
...저자 등등...
“Update a.txt”
commit 73d3
tree 9d1c
tree
9d1c
blob e965
blob e965 a.txt
...저자 등등...
“Hello”
blob 216e b.txt
“Add a.txt and b.txt”
blob 216e
“World”
13년 10월 17일 목요일
30. $ echo HELLO a.txt
$ git add a.txt
$ git commit -m ‘Update a.txt’
Git Repository (non-bare)
Working Directory (.)
a.txt
“HELLO”
b.txt
a.txt
e427
b.txt
HEAD
Object Database
(.git/objects/)
“World”
Index (.git/index)
Refs (.git/)
tree 06d2
blob e427
blob e427 a.txt
“HELLO”
blob 216e b.txt
216e
master
commit 8511
tree
06d2
parent
73d3
...저자 등등...
“Update a.txt”
commit 73d3
tree 9d1c
tree
9d1c
blob e965
blob e965 a.txt
...저자 등등...
“Hello”
blob 216e b.txt
“Add a.txt and b.txt”
blob 216e
“World”
13년 10월 17일 목요일
31. $ rm b.txt
Git Repository (non-bare)
Working Directory (.)
a.txt
“HELLO”
b.txt
a.txt
e427
b.txt
HEAD
Object Database
(.git/objects/)
“World”
Index (.git/index)
Refs (.git/)
tree 06d2
blob e427
blob e427 a.txt
“HELLO”
blob 216e b.txt
216e
master
commit 8511
tree
06d2
parent
73d3
...저자 등등...
“Update a.txt”
commit 73d3
tree 9d1c
tree
9d1c
blob e965
blob e965 a.txt
...저자 등등...
“Hello”
blob 216e b.txt
“Add a.txt and b.txt”
blob 216e
“World”
13년 10월 17일 목요일
32. $ rm b.txt
$ git rm --cached b.txt
Git Repository (non-bare)
Working Directory (.)
a.txt
“HELLO”
Refs (.git/)
HEAD
Object Database
(.git/objects/)
tree 06d2
Index (.git/index)
a.txt
e427
b.txt
blob e427
blob e427 a.txt
“HELLO”
blob 216e b.txt
216e
master
commit 8511
tree
06d2
parent
73d3
...저자 등등...
“Update a.txt”
commit 73d3
tree 9d1c
tree
9d1c
blob e965
blob e965 a.txt
...저자 등등...
“Hello”
blob 216e b.txt
“Add a.txt and b.txt”
blob 216e
“World”
13년 10월 17일 목요일
33. $ rm b.txt
$ git rm --cached b.txt
$ git commit -m ‘Delete b.txt’
Git Repository (non-bare)
Working Directory (.)
a.txt
“HELLO”
Refs (.git/)
HEAD
Object Database
(.git/objects/)
tree 06d2
Index (.git/index)
a.txt
e427
blob e427
blob e427 a.txt
“HELLO”
blob 216e b.txt
master
commit 8511
tree
06d2
parent
73d3
...저자 등등...
“Update a.txt”
commit 73d3
tree 9d1c
tree
9d1c
blob e965
blob e965 a.txt
...저자 등등...
“Hello”
blob 216e b.txt
“Add a.txt and b.txt”
blob 216e
“World”
13년 10월 17일 목요일
34. $ rm b.txt
$ git rm --cached b.txt
$ git commit -m ‘Delete b.txt’
Git Repository (non-bare)
Working Directory (.)
a.txt
“HELLO”
Refs (.git/)
HEAD
Object Database
(.git/objects/)
tree 4fa8
Index (.git/index)
a.txt
blob e427 a.txt
e427
tree 06d2
blob e427
blob e427 a.txt
“HELLO”
blob 216e b.txt
master
commit 8bc3
tree
4fa8
parent
8511
...저자 등등...
“Delete b.txt”
commit 8511
tree
06d2
parent
73d3
...저자 등등...
“Update a.txt”
commit 73d3
tree 9d1c
13년 10월 17일 목요일
blob e965
blob e965 a.txt
tree
9d1c
...저자 등등...
35. $ rm b.txt
$ git rm --cached b.txt
$ git commit -m ‘Delete b.txt’
Git Repository (non-bare)
Working Directory (.)
a.txt
“HELLO”
Refs (.git/)
HEAD
Object Database
(.git/objects/)
tree 4fa8
Index (.git/index)
a.txt
blob e427 a.txt
e427
tree 06d2
blob e427
blob e427 a.txt
“HELLO”
blob 216e b.txt
master
commit 8bc3
tree
4fa8
parent
8511
...저자 등등...
“Delete b.txt”
commit 8511
tree
06d2
parent
73d3
...저자 등등...
“Update a.txt”
commit 73d3
tree 9d1c
13년 10월 17일 목요일
blob e965
blob e965 a.txt
tree
9d1c
...저자 등등...
36. $ mv a.txt A.txt
Git Repository (non-bare)
Working Directory (.)
a.txt
“HELLO”
Refs (.git/)
HEAD
Object Database
(.git/objects/)
tree 4fa8
Index (.git/index)
a.txt
blob e427 a.txt
e427
tree 06d2
blob e427
blob e427 a.txt
“HELLO”
blob 216e b.txt
master
commit 8bc3
tree
4fa8
parent
8511
...저자 등등...
“Delete b.txt”
commit 8511
tree
06d2
parent
73d3
...저자 등등...
“Update a.txt”
commit 73d3
tree 9d1c
13년 10월 17일 목요일
blob e965
blob e965 a.txt
tree
9d1c
...저자 등등...
37. $ mv a.txt A.txt
Git Repository (non-bare)
Working Directory (.)
A.txt
“HELLO”
Refs (.git/)
HEAD
Object Database
(.git/objects/)
tree 4fa8
Index (.git/index)
a.txt
blob e427 a.txt
e427
tree 06d2
blob e427
blob e427 a.txt
“HELLO”
blob 216e b.txt
master
commit 8bc3
tree
4fa8
parent
8511
...저자 등등...
“Delete b.txt”
commit 8511
tree
06d2
parent
73d3
...저자 등등...
“Update a.txt”
commit 73d3
tree 9d1c
13년 10월 17일 목요일
blob e965
blob e965 a.txt
tree
9d1c
...저자 등등...
38. $ mv a.txt A.txt
$ git rm --cached a.txt
Git Repository (non-bare)
Working Directory (.)
A.txt
“HELLO”
Refs (.git/)
HEAD
Object Database
(.git/objects/)
tree 4fa8
Index (.git/index)
a.txt
blob e427 a.txt
e427
tree 06d2
blob e427
blob e427 a.txt
“HELLO”
blob 216e b.txt
master
commit 8bc3
tree
4fa8
parent
8511
...저자 등등...
“Delete b.txt”
commit 8511
tree
06d2
parent
73d3
...저자 등등...
“Update a.txt”
commit 73d3
tree 9d1c
13년 10월 17일 목요일
blob e965
blob e965 a.txt
tree
9d1c
...저자 등등...
39. $ mv a.txt A.txt
$ git rm --cached a.txt
Git Repository (non-bare)
Working Directory (.)
A.txt
“HELLO”
Refs (.git/)
HEAD
Object Database
(.git/objects/)
tree 4fa8
Index (.git/index)
blob e427 a.txt
tree 06d2
blob e427
blob e427 a.txt
“HELLO”
blob 216e b.txt
master
commit 8bc3
tree
4fa8
parent
8511
...저자 등등...
“Delete b.txt”
commit 8511
tree
06d2
parent
73d3
...저자 등등...
“Update a.txt”
commit 73d3
tree 9d1c
13년 10월 17일 목요일
blob e965
blob e965 a.txt
tree
9d1c
...저자 등등...
40. $ mv a.txt A.txt
$ git rm --cached a.txt
$ git add A.txt
Git Repository (non-bare)
Working Directory (.)
A.txt
“HELLO”
Refs (.git/)
HEAD
Object Database
(.git/objects/)
tree 4fa8
Index (.git/index)
blob e427 a.txt
tree 06d2
blob e427
blob e427 a.txt
“HELLO”
blob 216e b.txt
master
commit 8bc3
tree
4fa8
parent
8511
...저자 등등...
“Delete b.txt”
commit 8511
tree
06d2
parent
73d3
...저자 등등...
“Update a.txt”
commit 73d3
tree 9d1c
13년 10월 17일 목요일
blob e965
blob e965 a.txt
tree
9d1c
...저자 등등...
41. $ mv a.txt A.txt
$ git rm --cached a.txt
$ git add A.txt
Git Repository (non-bare)
Working Directory (.)
A.txt
“HELLO”
Refs (.git/)
HEAD
Object Database
(.git/objects/)
tree 4fa8
Index (.git/index)
A.txt
blob e427 a.txt
e427
tree 06d2
blob e427
blob e427 a.txt
“HELLO”
blob 216e b.txt
master
commit 8bc3
tree
4fa8
parent
8511
...저자 등등...
“Delete b.txt”
commit 8511
tree
06d2
parent
73d3
...저자 등등...
“Update a.txt”
commit 73d3
tree 9d1c
13년 10월 17일 목요일
blob e965
blob e965 a.txt
tree
9d1c
...저자 등등...
42. $ git commit -m ‘Rename a.txt to A.txt’
Git Repository (non-bare)
Working Directory (.)
A.txt
“HELLO”
Refs (.git/)
HEAD
Object Database
(.git/objects/)
tree 4fa8
Index (.git/index)
A.txt
blob e427 a.txt
e427
tree 06d2
blob e427
blob e427 a.txt
“HELLO”
blob 216e b.txt
master
commit 8bc3
tree
4fa8
parent
8511
...저자 등등...
“Delete b.txt”
commit 8511
tree
06d2
parent
73d3
...저자 등등...
“Update a.txt”
commit 73d3
tree 9d1c
13년 10월 17일 목요일
blob e965
blob e965 a.txt
tree
9d1c
...저자 등등...
43. $ git commit -m ‘Rename a.txt to A.txt’
Git Repository (non-bare)
Working Directory (.)
A.txt
“HELLO”
HEAD
Object Database
(.git/objects/)
tree 8808
Index (.git/index)
A.txt
Refs (.git/)
blob e427 A.txt
e427
master
commit 2825
tree
8808
parent
8511
...저자 등등...
“Rename a.txt to...”
blob e427 a.txt
commit 8bc3
tree
4fa8
parent
8511
...저자 등등...
“Delete b.txt”
tree 06d2
commit 8511
tree
06d2
parent
73d3
tree 4fa8
blob e427
“HELLO”
13년 10월 17일 목요일
blob e427 a.txt
44. $ git commit -m ‘Rename a.txt to A.txt’
Git Repository (non-bare)
Working Directory (.)
A.txt
“HELLO”
HEAD
Object Database
(.git/objects/)
tree 8808
Index (.git/index)
A.txt
Refs (.git/)
blob e427 A.txt
e427
master
commit 2825
tree
8808
parent
8511
...저자 등등...
“Rename a.txt to...”
blob e427 a.txt
commit 8bc3
tree
4fa8
parent
8511
...저자 등등...
“Delete b.txt”
tree 06d2
commit 8511
tree
06d2
parent
73d3
tree 4fa8
blob e427
“HELLO”
13년 10월 17일 목요일
blob e427 a.txt
45. $ mkdir src
Git Repository (non-bare)
Working Directory (.)
A.txt
“HELLO”
HEAD
Object Database
(.git/objects/)
tree 8808
Index (.git/index)
A.txt
Refs (.git/)
blob e427 A.txt
e427
master
commit 2825
tree
8808
parent
8511
...저자 등등...
“Rename a.txt to...”
blob e427 a.txt
commit 8bc3
tree
4fa8
parent
8511
...저자 등등...
“Delete b.txt”
tree 06d2
commit 8511
tree
06d2
parent
73d3
tree 4fa8
blob e427
“HELLO”
13년 10월 17일 목요일
blob e427 a.txt
46. $ mkdir src
$ git mv A.txt src/A.txt
Git Repository (non-bare)
Working Directory (.)
src/
A.txt
HEAD
Object Database
(.git/objects/)
“HELLO”
tree 8808
Index (.git/index)
A.txt
Refs (.git/)
blob e427 A.txt
e427
master
commit 2825
tree
8808
parent
8511
...저자 등등...
“Rename a.txt to...”
blob e427 a.txt
commit 8bc3
tree
4fa8
parent
8511
...저자 등등...
“Delete b.txt”
tree 06d2
commit 8511
tree
06d2
parent
73d3
tree 4fa8
blob e427
“HELLO”
13년 10월 17일 목요일
blob e427 a.txt
47. $ mkdir src
$ git mv A.txt src/A.txt
Git Repository (non-bare)
Working Directory (.)
src/
src/A.txt
HEAD
Object Database
(.git/objects/)
“HELLO”
tree 8808
Index (.git/index)
A.txt
Refs (.git/)
blob e427 A.txt
e427
master
commit 2825
tree
8808
parent
8511
...저자 등등...
“Rename a.txt to...”
blob e427 a.txt
commit 8bc3
tree
4fa8
parent
8511
...저자 등등...
“Delete b.txt”
tree 06d2
commit 8511
tree
06d2
parent
73d3
tree 4fa8
blob e427
“HELLO”
13년 10월 17일 목요일
blob e427 a.txt
48. $ mkdir src
$ git mv A.txt src/A.txt
$ git commit -m ‘Move A.txt into src’
Git Repository (non-bare)
Working Directory (.)
src/
src/A.txt
HEAD
Object Database
(.git/objects/)
“HELLO”
tree 8808
Index (.git/index)
src/A.txt
Refs (.git/)
blob e427 A.txt
e427
master
commit 2825
tree
8808
parent
8511
...저자 등등...
“Rename a.txt to...”
blob e427 a.txt
commit 8bc3
tree
4fa8
parent
8511
...저자 등등...
“Delete b.txt”
tree 06d2
commit 8511
tree
06d2
parent
73d3
tree 4fa8
blob e427
“HELLO”
13년 10월 17일 목요일
blob e427 a.txt
49. $ mkdir src
$ git mv A.txt src/A.txt
$ git commit -m ‘Move A.txt into src’
Git Repository (non-bare)
Working Directory (.)
src/
src/A.txt
HEAD
Object Database
(.git/objects/)
“HELLO”
tree 2dc1
Index (.git/index)
src/A.txt
Refs (.git/)
tree 8808 src/
e427
tree 8808
blob e427
blob e427 A.txt
“HELLO”
tree 4fa8
13년 10월 17일 목요일
blob e427 a.txt
master
commit 3183
tree
2dc1
parent
2825
...저자 등등...
“Move a.txt into src”
commit 2825
tree
8808
parent
8511
...저자 등등...
“Rename a.txt to...”
commit 8bc3
tree
4fa8
parent
8511
50. $ mkdir src
$ git mv A.txt src/A.txt
$ git commit -m ‘Move A.txt into src’
Git Repository (non-bare)
Working Directory (.)
src/
src/A.txt
HEAD
Object Database
(.git/objects/)
“HELLO”
tree 2dc1
Index (.git/index)
src/A.txt
Refs (.git/)
tree 8808 src/
e427
tree 8808
blob e427
blob e427 A.txt
“HELLO”
tree 4fa8
13년 10월 17일 목요일
blob e427 a.txt
master
commit 3183
tree
2dc1
parent
2825
...저자 등등...
“Move a.txt into src”
commit 2825
tree
8808
parent
8511
...저자 등등...
“Rename a.txt to...”
commit 8bc3
tree
4fa8
parent
8511
51. $ mkdir src
$ git mv A.txt src/A.txt
$ git commit -m ‘Move A.txt into src’
Git Repository (non-bare)
Working Directory (.)
src/
src/A.txt
“HELLO”
Index (.git/index)
src/A.txt
e427
Refs (.git/)
HEAD
Object Database
(.git/objects/)
src/
브랜치와 머지
tree 2dc1
tree 8808 src/
tree 8808
blob e427
HELLO
“HELLO”
blob e427 A.txt
A.txt
tree 4fa8
13년 10월 17일 목요일
blob a.txt a.txt
e427
master
commit 3183
tree Move
2dc1
parent A.txt...
2825
...저자 등등...
“Move a.txt into src”
commit 2825
treeRename
8808
parent
8511
a.txt...
...저자 등등...
“Rename a.txt to...”
commit 8bc3
tree
4fa8
Delete
parent
8511
53. $ git co -b branch-1
t5
E
t4
D
t3
C
b2
t2
B
b1
t1
A
b3
13년 10월 17일 목요일
branch-1
master HEAD
54. $ git co -b branch-1
t5
E
t4
D
t3
C
b2
t2
B
b1
t1
A
b3
13년 10월 17일 목요일
branch-1 HEAD
master
57. $ git co master
b2
t2
t5
F
branch-1 HEAD
E
master
t4
D
t3
C
b2
t2
B
b1
t1
A
b3
13년 10월 17일 목요일
58. $ git co master
b2
t2
t5
F
branch-1
E
master
t4
D
t3
C
b2
t2
B
b1
t1
A
b3
13년 10월 17일 목요일
HEAD
59. $ git merge branch-1
b2
t2
t5
F
branch-1
E
master
t4
D
t3
C
b2
t2
B
b1
t1
A
b3
13년 10월 17일 목요일
HEAD
상황1: 머지할 브랜
치가 현재 브랜치의
모든 커밋을 포함함
60. $ git merge branch-1
b2
t2
t5
F
E
t4
D
t3
C
b2
t2
B
b1
t1
A
b3
13년 10월 17일 목요일
branch-1
master HEAD
Fast-Forward
61. $ git merge branch-1
master
branch-1
b6
G
F
t6
t5
E
t4
b3
13년 10월 17일 목요일
D
t3
C
t7
HEAD
b7
상황2: 머지할 브랜
치가 현재 브랜치의
모든 커밋을 포함하
지는 않음
62. $ git merge branch-1
master
branch-1
b6
G
F
t6
t5
E
t4
b3
13년 10월 17일 목요일
D
t3
C
t7
HEAD
b7
상황2: 머지할 브랜
치가 현재 브랜치의
모든 커밋을 포함하
지는 않음
63. $ git merge branch-1
b8
E..F와 E..G를 머지
H
t8
master
branch-1
b6
G
F
t6
t5
t7
HEAD
b7
E
F와 G의 공통조상
t4
b3
13년 10월 17일 목요일
D
t3
C
64. $ git merge branch-1
b8
E..F와 E..G를 머지
master
H
t8
HEAD
branch-1
b6
G
F
t6
t5
t7
b7
E
F와 G의 공통조상
t4
b3
13년 10월 17일 목요일
D
t3
C
66. $ git rebase master
b8
F’
t8
master
branch-1
HEAD
b6
G
F
t6
t5
E
t4
b3
13년 10월 17일 목요일
D
t3
C
t7
b7
67. $ git rebase master
b8
HEAD
b6
F’
t8
branch-1
G
F
t6
t5
E
t4
b3
13년 10월 17일 목요일
master
D
t3
C
t7
b7
68. $ git reflog expire --all --expire=0
$ git prune
b8
HEAD
b6
F’
t8
branch-1
G
F
t6
t5
E
t4
b3
13년 10월 17일 목요일
master
D
t3
C
t7
b7
69. $ git reflog expire --all --expire=0
$ git prune
F’
b8
HEAD
branch-1
F
b6
G
E
D
b3
C
b2
B
b1
13년 10월 17일 목요일
master
A
b7
70. $ git reflog expire --all --expire=0
$ git prune
F’
b8
HEAD
branch-1
master
G
E
D
b3
b2
B
b1
13년 10월 17일 목요일
C
A
b7
71. $ git push origin master:master
F’
b8
HEAD
ref를
보낸다.
branch-1
G
E
master
master
G
b7
PUSH PULL
E
b7
b3
C
b3
b2
B
b2
가져온 ref가
D “완전하도록”
필요한
C 모든 object를
보낸다.
B
b1
A
b1
A
D
13년 10월 17일 목요일
72. $ git pull origin branch-2:master
Local
master FETCH_HEAD
G
H
E
F
D
ref를
가져온다
가져온 ref가
“완전하도록”
필요한 모든 object
를 가져온다.
Remote
master
G
H
E
F
D
C
C
B
B
A
13년 10월 17일 목요일
branch-2
A
73. $ git pull origin branch-2:master
Local
Remote
master
I
master
FETCH_HEAD
G
H
F
G
H
E
E
F
D
D
C
C
B
B
13년 10월 17일 목요일
A
A
branch-2
74. $ git pull origin branch-2:master
Local
Remote
master
master
I
FETCH_HEAD
G
H
F
G
H
E
E
F
D
D
C
C
B
B
13년 10월 17일 목요일
A
A
branch-2
75. $ git pull origin branch-2:master
Local
Remote
master
master
I
FETCH_HEAD
G
H
E
F
H’
G
H’
E
F
D
D
C
C
B
B
13년 10월 17일 목요일
A
A
branch-2
push
-f
76. $ git pull origin branch-2:master
Local
Remote
master
J
master
I
FETCH_HEAD
G
H
E
F
H’
G
H’
E
F
D
D
C
C
B
B
13년 10월 17일 목요일
A
A
branch-2
push
-f
77. $ git pull origin branch-2:master
Local
Remote
master
J
master
I
FETCH_HEAD
G
H
E
F
H’
G
H’
E
F
D
D
C
C
B
B
13년 10월 17일 목요일
A
A
branch-2
push
-f