Skip to content

Commit 19db9cf

Browse files
committed
subtree: document new subtree commands
Signed-off-by: Tom Clarkson <[email protected]>
1 parent 27a43ea commit 19db9cf

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

contrib/subtree/git-subtree.txt

+24
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ useful elsewhere, you can extract its entire history and publish
5252
that as its own git repository, without accidentally
5353
intermingling the history of your application project.
5454

55+
Although the relationship between subtree and mainline commits is stored
56+
in regular git history, it is also cached between subtree runs. In most
57+
cases this is merely a performance improvement, but for projects with
58+
large and complex histories the cache can be manipulated directly
59+
with the use, ignore and map commands.
60+
5561
[TIP]
5662
In order to keep your commit messages clean, we recommend that
5763
people split their commits between the subtrees and the main
@@ -120,6 +126,21 @@ and friends will work as expected.
120126
Note that if you use '--squash' when you merge, you should usually not
121127
just '--rejoin' when you split.
122128

129+
ignore::
130+
Mark a commit and all of its history as irrelevant to subtree split.
131+
In most cases this would be handled automatically based on metadata
132+
from subtree join commits. Intended for improving performance on
133+
extremely large repos and excluding complex history that turns out
134+
to be otherwise problematic.
135+
136+
use::
137+
Mark a commit and all of its history as part of an existing subtree.
138+
In normal circumstances this would be handled based on the metadata
139+
from the subtree join commit. Similar to the --onto option of split.
140+
141+
map::
142+
Manually override the normal output of split for a particular commit.
143+
Extreme flexibility for advanced troubleshooting purposes only.
123144

124145
OPTIONS
125146
-------
@@ -142,6 +163,9 @@ OPTIONS
142163
This option is only valid for add, merge and pull (unsure).
143164
Specify <message> as the commit message for the merge commit.
144165

166+
--clear-cache::
167+
Reset the subtree cache and recalculate all subtree mappings from the
168+
commit history
145169

146170
OPTIONS FOR add, merge, push, pull
147171
----------------------------------

0 commit comments

Comments
 (0)