From: "Simon A. Eugster" <simon.eu@gmail.com>
To: git@vger.kernel.org
Cc: "Simon A. Eugster" <simon.eugster@eps.ch>
Subject: [PATCH] Documentation clarification on git-checkout regarding ours/theirs
Date: Fri, 10 Jul 2015 10:27:57 +0200 [thread overview]
Message-ID: <1436516877-21064-1-git-send-email-simon.eu@gmail.com> (raw)
From: "Simon A. Eugster" <simon.eugster@eps.ch>
Signed-off-by: Simon A. Eugster <simon.eugster@eps.ch>
---
Documentation/git-checkout.txt | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index d263a56..d69306f 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -115,7 +115,21 @@ entries; instead, unmerged entries are ignored.
--ours::
--theirs::
When checking out paths from the index, check out stage #2
- ('ours') or #3 ('theirs') for unmerged paths.
+ ('ours', HEAD) or #3 ('theirs', MERGE_HEAD) for unmerged paths.
+ See linkgit:git-merge[1] for details about stages #2 and #3.
++
+Note that during `git rebase` and `git pull --rebase`, 'theirs' checks out
+the local version, and 'ours' the remote version or the history that is rebased
+against.
++
+The reason ours/theirs appear to be swapped during a rebase is that we
+define the remote history as the canonical history, on top of which our
+private commits are applied on, as opposed to normal merging where the
+local history is the canonical one.
+During merging, we assume the role of the canonical history’s keeper,
+which, in case of a rebase, is the remote history, and our private commits
+look to the keeper as “their” commits which need to be integrated on top
+of “our” work.
-b <new_branch>::
Create a new branch named <new_branch> and start it at
--
1.8.5.1
next reply other threads:[~2015-07-10 8:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-10 8:27 Simon A. Eugster [this message]
2015-07-10 20:07 ` [PATCH] Documentation clarification on git-checkout regarding ours/theirs Junio C Hamano
2015-07-11 5:26 ` Simon A. Eugster
2015-07-12 16:36 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2015-06-11 11:39 Simon A. Eugster
2015-06-11 15:37 ` Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1436516877-21064-1-git-send-email-simon.eu@gmail.com \
--to=simon.eu@gmail.com \
--cc=git@vger.kernel.org \
--cc=simon.eugster@eps.ch \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).