From: Brian Gernhardt <benji@silverinsanity.com>
To: Git List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] Documentation: mention ORIG_HEAD in am, merge, and rebase
Date: Tue, 8 Jul 2008 00:12:22 -0400 [thread overview]
Message-ID: <1215490342-46590-1-git-send-email-benji@silverinsanity.com> (raw)
In-Reply-To: <35BBB0D4-B3E1-4097-AF11-E0F6223125EA@silverinsanity.com>
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>
---
Documentation/git-am.txt | 6 ++++++
Documentation/git-merge.txt | 4 +++-
Documentation/git-rebase.txt | 3 ++-
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
index 3863eeb..88ca5f1 100644
--- a/Documentation/git-am.txt
+++ b/Documentation/git-am.txt
@@ -145,6 +145,12 @@ directory exists, so if you decide to start over from scratch,
run `rm -f -r .dotest` before running the command with mailbox
names.
+Before any patches are applied, ORIG_HEAD is set to the tip of the
+current branch. This is useful if you have problems with multiple
+commits, like running 'git am' on the wrong branch or an error in the
+commits that is more easily fixed by changing the mailbox (e.g.
+errors in the "From:" lines).
+
SEE ALSO
--------
diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
index 62f99b5..019e4ca 100644
--- a/Documentation/git-merge.txt
+++ b/Documentation/git-merge.txt
@@ -81,7 +81,9 @@ Otherwise, merge will refuse to do any harm to your repository
(that is, it may fetch the objects from remote, and it may even
update the local branch used to keep track of the remote branch
with `git pull remote rbranch:lbranch`, but your working tree,
-`.git/HEAD` pointer and index file are left intact).
+`.git/HEAD` pointer and index file are left intact). In addition,
+merge always sets `.git/ORIG_HEAD` to the original state of HEAD so
+a problematic merge can be removed by using `git reset ORIG_HEAD`.
You may have local modifications in the working tree files. In
other words, 'git-diff' is allowed to report changes.
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index f3459c7..37382c4 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -26,7 +26,8 @@ of commits that would be shown by `git log <upstream>..HEAD`.
The current branch is reset to <upstream>, or <newbase> if the
--onto option was supplied. This has the exact same effect as
-`git reset --hard <upstream>` (or <newbase>).
+`git reset --hard <upstream>` (or <newbase>). This includes setting
+ORIG_HEAD to the pre-rebase tip of the branch.
The commits that were previously saved into the temporary area are
then reapplied to the current branch, one by one, in order. Note that
--
1.5.6.2.393.g45096
next prev parent reply other threads:[~2008-07-08 4:13 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-06 21:22 [FIXED PATCH] Make rebase save ORIG_HEAD if changing current branch Brian Gernhardt
2008-07-07 4:43 ` Junio C Hamano
2008-07-07 5:16 ` Brian Gernhardt
2008-07-07 5:24 ` Junio C Hamano
2008-07-07 6:28 ` Junio C Hamano
2008-07-07 6:48 ` Junio C Hamano
2008-07-07 11:18 ` Theodore Tso
2008-07-07 11:42 ` Jakub Narebski
2008-07-07 15:03 ` Brian Gernhardt
2008-07-08 4:26 ` Jeff King
2008-07-08 14:32 ` Brian Gernhardt
2008-07-07 14:36 ` Brian Gernhardt
2008-07-07 18:04 ` Junio C Hamano
2008-07-07 21:58 ` Junio C Hamano
2008-07-07 22:14 ` Jakub Narebski
2008-07-07 22:33 ` Junio C Hamano
2008-07-07 22:58 ` Jakub Narebski
2008-07-08 3:24 ` Brian Gernhardt
2008-07-08 4:12 ` Brian Gernhardt [this message]
2008-07-08 19:23 ` [PATCH] Documentation: mention ORIG_HEAD in am, merge, and rebase Junio C Hamano
2008-07-08 19:28 ` Brian Gernhardt
2008-07-08 3:28 ` [FIXED PATCH] Make rebase save ORIG_HEAD if changing current branch Jay Soffian
2008-07-07 5:41 ` Mike Hommey
2008-07-07 5:46 ` Junio C Hamano
2008-07-07 5:48 ` Mike Hommey
2008-07-07 6:14 ` Nanako Shiraishi
2008-07-07 7:16 ` Re* " Junio C Hamano
2008-07-07 14:36 ` Brian Gernhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1215490342-46590-1-git-send-email-benji@silverinsanity.com \
--to=benji@silverinsanity.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).