Skip to content

Commit ed10d9a

Browse files
Miklos Vajnagitster
authored andcommitted
Documentation/git-filter-branch: add a new msg-filter example
There were no example on how to edit commit messages, so add an msg-filter example. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent ce4a7bf commit ed10d9a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Documentation/git-filter-branch.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,15 @@ committed a merge between P1 and P2, it will be propagated properly
240240
and all children of the merge will become merge commits with P1,P2
241241
as their parents instead of the merge commit.
242242

243+
You can rewrite the commit log messages using `--message-filter`. For
244+
example, `git-svn-id` strings in a repository created by `git-svn` can
245+
be removed this way:
246+
247+
-------------------------------------------------------
248+
git filter-branch --message-filter '
249+
sed -e "/^git-svn-id:/d"
250+
'
251+
-------------------------------------------------------
243252

244253
To restrict rewriting to only part of the history, specify a revision
245254
range in addition to the new branch name. The new branch name will

0 commit comments

Comments
 (0)