Skip to content

Commit 8093ae8

Browse files
andreas-schwabgitster
authored andcommitted
Documentation/git-filter-branch: Move note about effect of removing commits
The note that explains that changes introduced by removed commits are preserved should be placed directly after the paragraph that describes such commits removal. Otherwise the reference to "the commits" appears out of context. Also the big example that follows "Consider this history" is about rewriting part of the history DAG. Move the paragraph that describes the operation close to it. Signed-off-by: Andreas Schwab <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5805853 commit 8093ae8

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

Documentation/git-filter-branch.txt

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,11 @@ committed a merge between P1 and P2, it will be propagated properly
304304
and all children of the merge will become merge commits with P1,P2
305305
as their parents instead of the merge commit.
306306

307+
*NOTE* the changes introduced by the commits, and which are not reverted
308+
by subsequent commits, will still be in the rewritten branch. If you want
309+
to throw out _changes_ together with the commits, you should use the
310+
interactive mode of 'git rebase'.
311+
307312
You can rewrite the commit log messages using `--msg-filter`. For
308313
example, 'git svn-id' strings in a repository created by 'git svn' can
309314
be removed this way:
@@ -314,11 +319,6 @@ git filter-branch --msg-filter '
314319
'
315320
-------------------------------------------------------
316321

317-
To restrict rewriting to only part of the history, specify a revision
318-
range in addition to the new branch name. The new branch name will
319-
point to the top-most revision that a 'git rev-list' of this range
320-
will print.
321-
322322
If you need to add 'Acked-by' lines to, say, the last 10 commits (none
323323
of which is a merge), use this command:
324324

@@ -329,11 +329,10 @@ git filter-branch --msg-filter '
329329
' HEAD~10..HEAD
330330
--------------------------------------------------------
331331

332-
*NOTE* the changes introduced by the commits, and which are not reverted
333-
by subsequent commits, will still be in the rewritten branch. If you want
334-
to throw out _changes_ together with the commits, you should use the
335-
interactive mode of 'git rebase'.
336-
332+
To restrict rewriting to only part of the history, specify a revision
333+
range in addition to the new branch name. The new branch name will
334+
point to the top-most revision that a 'git rev-list' of this range
335+
will print.
337336

338337
Consider this history:
339338

0 commit comments

Comments
 (0)