git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] Documentation clarification on git-checkout regarding ours/theirs
@ 2015-06-11 11:39 Simon A. Eugster
  2015-06-11 15:37 ` Junio C Hamano
  0 siblings, 1 reply; 14+ messages in thread
From: Simon A. Eugster @ 2015-06-11 11:39 UTC (permalink / raw)
  To: git; +Cc: Simon A. Eugster

From: "Simon A. Eugster" <simon.eugster@eps.ch>

Signed-off-by: Simon A. Eugster <simon.eugster@eps.ch>
---
 Documentation/git-checkout.txt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index d263a56..5c3ef86 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -115,7 +115,11 @@ 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.
++
+After a `git pull --rebase`, for example, 'ours' points to the remote
+version and 'theirs' points to the local version. See linkgit:git-merge[1]
+for details about stages #2 and #3.
 
 -b <new_branch>::
 	Create a new branch named <new_branch> and start it at
-- 
1.8.5.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread
* [PATCH] Documentation clarification on git-checkout regarding ours/theirs
@ 2015-07-10  8:27 Simon A. Eugster
  2015-07-10 20:07 ` Junio C Hamano
  0 siblings, 1 reply; 14+ messages in thread
From: Simon A. Eugster @ 2015-07-10  8:27 UTC (permalink / raw)
  To: git; +Cc: Simon A. Eugster

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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-07-12 16:36 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-11 11:39 [PATCH] Documentation clarification on git-checkout regarding ours/theirs Simon A. Eugster
2015-06-11 15:37 ` Junio C Hamano
2015-06-15 12:47   ` [PATCH] Documentation clarification on git-checkout Simon A. Eugster
2015-06-15 12:47     ` [PATCH 1/2] Documentation clarification on git-checkout regarding ours/theirs Simon A. Eugster
2015-06-15 12:47     ` [PATCH 2/2] Documentation on git-checkout --ours/--theirs improved Simon A. Eugster
2015-06-15 20:10       ` Junio C Hamano
2015-06-16  7:03         ` Simon Eugster
2015-06-16 15:41           ` Junio C Hamano
2015-06-17 14:31             ` Simon Eugster
2015-06-17 15:10               ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2015-07-10  8:27 [PATCH] Documentation clarification on git-checkout regarding ours/theirs Simon A. Eugster
2015-07-10 20:07 ` Junio C Hamano
2015-07-11  5:26   ` Simon A. Eugster
2015-07-12 16:36     ` Junio C Hamano

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).