X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=Documentation%2Fgit-filter-branch.txt;h=394a77a35f2019f5c86f9e90e94b88cf56da04ae;hb=f2f3a6b802e3dae09a1c414cd8516ff2a546a527;hp=ab527b5b316a81eddd8a0eefb501448a3097182f;hpb=8cc15acfb8845bd23f68c92a51b68d57a72a9fed;p=thirdparty%2Fgit.git diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt index ab527b5b31..394a77a35f 100644 --- a/Documentation/git-filter-branch.txt +++ b/Documentation/git-filter-branch.txt @@ -12,6 +12,7 @@ SYNOPSIS [--index-filter ] [--parent-filter ] [--msg-filter ] [--commit-filter ] [--tag-name-filter ] [--subdirectory-filter ] + [--prune-empty] [--original ] [-d ] [-f | --force] [--] [...] @@ -158,7 +159,18 @@ to other tags will be rewritten to point to the underlying commit. --subdirectory-filter :: 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 @@ -305,6 +317,16 @@ range in addition to the new branch name. The new branch name will point to the top-most revision that a 'git-rev-list' of this range will print. +If you need to add 'Acked-by' lines to, say, the last 10 commits (none +of which is a merge), use this command: + +-------------------------------------------------------- +git filter-branch --msg-filter ' + cat && + echo "Acked-by: Bugs Bunny " +' HEAD~10..HEAD +-------------------------------------------------------- + *NOTE* the changes introduced by the commits, and which are not reverted by subsequent commits, will still be in the rewritten branch. If you want to throw out _changes_ together with the commits, you should use the