]> git.ipfire.org Git - thirdparty/git.git/blobdiff - Documentation/git-filter-branch.txt
filter-branch: nearest-ancestor rewriting outside subdir filter
[thirdparty/git.git] / Documentation / git-filter-branch.txt
index 2b40babb6ba1c5eb99ae2cc7748854f5e4dcd864..394a77a35f2019f5c86f9e90e94b88cf56da04ae 100644 (file)
@@ -159,7 +159,18 @@ to other tags will be rewritten to point to the underlying commit.
 --subdirectory-filter <directory>::
        Only look at the history which touches the given subdirectory.
        The result will contain that directory (and only that) as its
-       project root.
+       project root.  Implies --remap-to-ancestor.
+
+--remap-to-ancestor::
+       Rewrite refs to the nearest rewritten ancestor instead of
+       ignoring them.
++
+Normally, positive refs on the command line are only changed if the
+commit they point to was rewritten.  However, you can limit the extent
+of this rewriting by using linkgit:rev-list[1] arguments, e.g., path
+limiters.  Refs pointing to such excluded commits would then normally
+be ignored.  With this option, they are instead rewritten to point at
+the nearest ancestor that was not excluded.
 
 --prune-empty::
        Some kind of filters will generate empty commits, that left the tree