path: root/Documentation/git-filter-branch.txt
diff options
authorJohannes Schindelin <>2009-08-17 20:38:46 (GMT)
committerJunio C Hamano <>2009-08-18 19:20:58 (GMT)
commitb8f423327bea8b82f1cd08cbed52a54a757de856 (patch)
tree97adc2b20ddfe06739121a99d7af00d506d3fd67 /Documentation/git-filter-branch.txt
parent13354f5377d82baee4d8c930df824c8dbeda396d (diff)
filter-branch: add an example how to add ACKs to a range of commits
When you have to add certain lines like ACKs (or for that matter, Signed-off-by:s) to a range of commits starting with HEAD, you might be tempted to use 'git rebase -i -10', but that is a waste of your time. It is better to use 'git filter-branch' with an appropriate message filter, and this commit adds an example how to do so to filter-branch's man page. Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-filter-branch.txt')
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
index ab527b5..32ea856 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -305,6 +305,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