5 rm -rf mainline subproj
15 git branch
-m master subproj
31 git commit
-m 'main-1'
32 git branch
-m master mainline
34 git fetch ..
/subproj sub1
35 git branch sub1 FETCH_HEAD
36 git read-tree
--prefix=subdir FETCH_HEAD
38 git commit
-m 'initial-subdir-merge'
40 git merge
-m 'merge -s -ours' -s ours FETCH_HEAD
42 touch subdir
/main-sub3
43 git add subdir
/main-sub3
44 git commit
-m 'main-sub3'
48 git commit
-m 'main-2 boring'
50 touch subdir
/main-sub4
51 git add subdir
/main-sub4
52 git commit
-m 'main-sub4'
54 git fetch ..
/subproj sub2
55 git branch sub2 FETCH_HEAD
56 git merge
-s subtree FETCH_HEAD
59 split1
=$
(git subtree
split --onto FETCH_HEAD subdir
--rejoin)
60 echo "split1={$split1}"
61 git branch split1
"$split1"
63 touch subdir
/main-sub5
64 git add subdir
/main-sub5
65 git commit
-m 'main-sub5'
68 git fetch ..
/mainline split1
69 git branch split1 FETCH_HEAD
77 split2
=$
(git subtree
split subdir
--rejoin)
78 git branch split2
"$split2"
80 touch subdir
/main-sub7
81 git add subdir
/main-sub7
82 git commit
-m 'main-sub7'
84 split3
=$
(git subtree
split subdir
--rejoin)
85 git branch split3
"$split3"
88 git fetch ..
/mainline split3
89 git branch split3 FETCH_HEAD
91 git branch subproj-merge-split3
94 git fetch ..
/subproj subproj-merge-split3
95 git branch subproj-merge-split3 FETCH_HEAD
96 git merge
-s subtree subproj-merge-split3