X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fhowto%2Frevert-branch-rebase.txt;h=d88ec23a97bc59f29a5f9734fc5ba0ef5a9ae6cf;hb=53756f290b94a0f8ee7021713fa63540d1a7e4e8;hp=5a7e0cfe05f10f1dd27d39af9c8c690b50972878;hpb=36d277c72d90d32f99616072b64a2652248f5264;p=git.git diff --git a/Documentation/howto/revert-branch-rebase.txt b/Documentation/howto/revert-branch-rebase.txt index 5a7e0cfe0..d88ec23a9 100644 --- a/Documentation/howto/revert-branch-rebase.txt +++ b/Documentation/howto/revert-branch-rebase.txt @@ -32,16 +32,16 @@ merge introduced 5 commits or so: ------------------------------------------------ $ git show-branch --more=4 master master^2 | head -! [master] Merge refs/heads/portable from http://www.cs.berkeley.... +* [master] Merge refs/heads/portable from http://www.cs.berkeley.... ! [master^2] Replace C99 array initializers with code. -- -+ [master] Merge refs/heads/portable from http://www.cs.berkeley.... -++ [master^2] Replace C99 array initializers with code. -++ [master^2~1] Replace unsetenv() and setenv() with older putenv(). -++ [master^2~2] Include sys/time.h in daemon.c. -++ [master^2~3] Fix ?: statements. -++ [master^2~4] Replace zero-length array decls with []. -+ [master~1] tutorial note about git branch +- [master] Merge refs/heads/portable from http://www.cs.berkeley.... +*+ [master^2] Replace C99 array initializers with code. +*+ [master^2~1] Replace unsetenv() and setenv() with older putenv(). +*+ [master^2~2] Include sys/time.h in daemon.c. +*+ [master^2~3] Fix ?: statements. +*+ [master^2~4] Replace zero-length array decls with []. +* [master~1] tutorial note about git branch ------------------------------------------------ The '--more=4' above means "after we reach the merge base of refs, @@ -85,7 +85,7 @@ Fortunately I did not have to; what I have in the current branch ------------------------------------------------ $ git checkout master -$ git resolve master revert-c99 fast ;# this should be a fast forward +$ git merge revert-c99 ;# this should be a fast forward Updating from 10d781b9caa4f71495c7b34963bef137216f86a8 to e3a693c... cache.h | 8 ++++---- commit.c | 2 +- @@ -95,13 +95,6 @@ Updating from 10d781b9caa4f71495c7b34963bef137216f86a8 to e3a693c... 5 files changed, 8 insertions(+), 8 deletions(-) ------------------------------------------------ -The 'fast' in the above 'git resolve' is not a magic. I knew this -'resolve' would result in a fast forward merge, and if not, there is -something very wrong (so I would do 'git reset' on the 'master' branch -and examine the situation). When a fast forward merge is done, the -message parameter to 'git resolve' is discarded, because no new commit -is created. You could have said 'junk' or 'nothing' there as well. - There is no need to redo the test at this point. We fast forwarded and we know 'master' matches 'revert-c99' exactly. In fact: @@ -193,8 +186,8 @@ $ git show-branch --more=1 master pu rc + [pu~4] Document "git cherry-pick" and "git revert" + [pu~5] Remove git-apply-patch-script. + [pu~6] Redo "revert" using three-way merge machinery. - + [rc] Merge refs/heads/master from . -+++ [master] Revert "Replace zero-length array decls with []." - + [rc~1] Merge refs/heads/master from . -+++ [master~1] Merge refs/heads/portable from http://www.cs.berkeley.... + - [rc] Merge refs/heads/master from . +++* [master] Revert "Replace zero-length array decls with []." + - [rc~1] Merge refs/heads/master from . +... [master~1] Merge refs/heads/portable from http://www.cs.berkeley.... ------------------------------------------------