summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 13354f5)
raw | patch | inline | side by side (parent: 13354f5)
author | Johannes Schindelin <johannes.schindelin@gmx.de> | |
Mon, 17 Aug 2009 20:38:46 +0000 (22:38 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 18 Aug 2009 19:20:58 +0000 (12:20 -0700) |
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 <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-filter-branch.txt | patch | blob | history |
index ab527b5b316a81eddd8a0eefb501448a3097182f..32ea8564a5d0c5ffebb251353569aeda8c02f651 100644 (file)
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 <bunny@bugzilla.org>"
+' 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