@matheusbsbs / matheus-bagliano / commits / 9869099bee
Fork 0

Documentation: mention ORIG_HEAD in am, merge, and rebase

Merge has always set ORIG_HEAD but never mentioned it, while we recently added it to am and rebase. These facts should be reflected in the documentation. git-reset also sets ORIG_HEAD, but that fact is already mentioned in the very first example so no changes were needed there. Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Brian Gernhardt committed Jul 8, 2008 at 00:12 UTC 9869099bee332e4c351c3aaa15a74786d85909c7
3 files changed +11 -2
Documentation/git-am.txt
+6
@@ -145,6 +145,12 @@ directory exists, so if you decide to start over from scratch,
145 run `rm -f -r .dotest` before running the command with mailbox
146 names.
147
148 +Before any patches are applied, ORIG_HEAD is set to the tip of the
149 +current branch. This is useful if you have problems with multiple
150 +commits, like running 'git am' on the wrong branch or an error in the
151 +commits that is more easily fixed by changing the mailbox (e.g.
152 +errors in the "From:" lines).
153 +
154
155 SEE ALSO
156 --------
Documentation/git-merge.txt
+3 -1
@@ -81,7 +81,9 @@ Otherwise, merge will refuse to do any harm to your repository
81 (that is, it may fetch the objects from remote, and it may even
82 update the local branch used to keep track of the remote branch
83 with `git pull remote rbranch:lbranch`, but your working tree,
84 -`.git/HEAD` pointer and index file are left intact).
84 +`.git/HEAD` pointer and index file are left intact). In addition,
85 +merge always sets `.git/ORIG_HEAD` to the original state of HEAD so
86 +a problematic merge can be removed by using `git reset ORIG_HEAD`.
87
88 You may have local modifications in the working tree files. In
89 other words, 'git-diff' is allowed to report changes.
Documentation/git-rebase.txt
+2 -1
@@ -26,7 +26,8 @@ of commits that would be shown by `git log <upstream>..HEAD`.
26
27 The current branch is reset to <upstream>, or <newbase> if the
28 --onto option was supplied. This has the exact same effect as
29 -`git reset --hard <upstream>` (or <newbase>).
29 +`git reset --hard <upstream>` (or <newbase>). ORIG_HEAD is set
30 +to point at the tip of the branch before the reset.
31
32 The commits that were previously saved into the temporary area are
33 then reapplied to the current branch, one by one, in order. Note that