git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 7/7] subtree: document new subtree commands

From
Tom Clarkson via GitGitGadget <gitgitgadget@gmail.com>
Date
Oct 6, 2020, 22:05 UTC
Message-ID
<fe2e4819b869725f870cd3ce99f1f8150fe17dc1.1602021913.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.493.v2.git.1602021913.gitgitgadget@gmail.com>
From: Tom Clarkson <tom@tqclarkson.com>
Signed-off-by: Tom Clarkson <tom@tqclarkson.com>
---
 contrib/subtree/git-subtree.txt | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
diff --git a/contrib/subtree/git-subtree.txt b/contrib/subtree/git-subtree.txt
index 352deda69d..a5a76e8ce6 100644
--- a/contrib/subtree/git-subtree.txt
+++ b/contrib/subtree/git-subtree.txt
@@ -52,6 +52,12 @@ useful elsewhere, you can extract its entire history and publish
 that as its own git repository, without accidentally
 intermingling the history of your application project.
 
+Although the relationship between subtree and mainline commits is stored
+in regular git history, it is also cached between subtree runs. In most
+cases this is merely a performance improvement, but for projects with
+large and complex histories the cache can be manipulated directly
+with the use, ignore and map commands.
+
 [TIP]
 In order to keep your commit messages clean, we recommend that
 people split their commits between the subtrees and the main
@@ -120,6 +126,21 @@ and friends will work as expected.
 Note that if you use '--squash' when you merge, you should usually not
 just '--rejoin' when you split.
 
+ignore::
+	Mark a commit and all of its history as irrelevant to subtree split.
+	In most cases this would be handled automatically based on metadata
+	from subtree join commits. Intended for improving performance on
+	extremely large repos and excluding complex history that turns out
+	to be otherwise problematic.
+
+use::
+	Mark a commit and all of its history as part of an existing subtree.
+	In normal circumstances this would be handled based on the metadata
+	from the subtree join commit. Similar to the --onto option of split.
+
+map::
+	Manually override the normal output of split for a particular commit.
+	Extreme flexibility for advanced troubleshooting purposes only.
 
 OPTIONS
 -------
@@ -142,6 +163,9 @@ OPTIONS
 	This option is only valid for add, merge and pull (unsure).
 	Specify <message> as the commit message for the merge commit.
 
+--clear-cache::
+	Reset the subtree cache and recalculate all subtree mappings from the
+	commit history
 
 OPTIONS FOR add, merge, push, pull
 ----------------------------------
-- 
gitgitgadget
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 26 of 28 in “subtree: Fix handling of complex history”
  1. 0/7 subtree: Fix handling of complex historyTom Clarkson via GitGitGadget, May 11, 2020
  2. 1/7 subtree: handle multiple parents passed to cache_missTom Clarkson via GitGitGadget, May 11, 2020
  3. 2/7 subtree: exclude commits predating add from recursive processingTom Clarkson via GitGitGadget, May 11, 2020
  4. 4/7 subtree: add git subtree map commandTom Clarkson via GitGitGadget, May 11, 2020
  5. 3/7 subtree: persist cache between split runsTom Clarkson via GitGitGadget, May 11, 2020
  6. 5/7 subtree: add git subtree use and ignore commandsTom Clarkson via GitGitGadget, May 11, 2020
  7. 7/7 subtree: document new subtree commandsTom Clarkson via GitGitGadget, May 11, 2020
  8. 6/7 subtree: more robustly distinguish subtree and mainline commitsTom Clarkson via GitGitGadget, May 11, 2020
  9. Ed MasteOct 4, 2020
  10. Johannes SchindelinOct 4, 2020
  11. Junio C HamanoOct 5, 2020
  12. Ed MasteOct 5, 2020
  13. Johannes SchindelinOct 7, 2020
  14. 0/7 subtree: Fix handling of complex historyTom Clarkson via GitGitGadget, Oct 6, 2020
  15. 4/7 subtree: add git subtree map commandTom Clarkson via GitGitGadget, Oct 6, 2020
  16. 1/7 subtree: handle multiple parents passed to cache_missTom Clarkson via GitGitGadget, Oct 6, 2020
  17. Ed MasteOct 7, 2020
  18. 5/7 subtree: add git subtree use and ignore commandsTom Clarkson via GitGitGadget, Oct 6, 2020
  19. Johannes SchindelinOct 7, 2020
  20. 6/7 subtree: more robustly distinguish subtree and mainline commitsTom Clarkson via GitGitGadget, Oct 6, 2020
  21. Johannes SchindelinOct 7, 2020
  22. 3/7 subtree: persist cache between split runsTom Clarkson via GitGitGadget, Oct 6, 2020
  23. Johannes SchindelinOct 7, 2020
  24. 2/7 subtree: exclude commits predating add from recursive processingTom Clarkson via GitGitGadget, Oct 6, 2020
  25. Johannes SchindelinOct 7, 2020
  26. 7/7 subtree: document new subtree commandsTom Clarkson via GitGitGadget, Oct 6, 2020
  27. Johannes SchindelinOct 7, 2020
  28. Johannes SchindelinOct 7, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.