git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: configure remote/local as mine/theirs

From
Johannes Sixt <j6t@kdbg.org>
Date
Apr 11, 2020, 21:40 UTC
Message-ID
<facf8152-00ce-4878-a13b-3fe72c13fa25@kdbg.org>
In-Reply-To
<CAJs9aZ-iXUtZoumnMzTFPrc=mtz2+s4EDUKhxw_KQp42h3mxBw@mail.gmail.com>
Am 11.04.20 um 14:51 schrieb rupert THURNER:
Show 8 quoted lines
> the git documentation is so clear withcalling changes "mine" or
> "theirs". when configuring a mergetool e.g. kdiff3, and doing a
> rebase, these names are not used. instead it is "local", which
> is theirs in the rebase case, and remote, which is mine. not
> that this is rocket science, and i understand the technical
> reason why the names are like this. but anyway i get a nod in
> my brain about it sometimes. can i somehow configure git so it
> would use "mine" and "theirs" only?

The words "mine" (actually "ours") and "theirs" have a very precise meaning in Git. If you were to use these meanings during a rebase, you would not like the result: it would call "ours" what you intend to call "theirs", and vice versa.

Consider this history:
--a--b--c--d   <-- upstream ("theirs" from your point of view)
   \
    x--y--z    <-- branch to rebase ("mine/ours" from your POV)

During a rebase, Git is "positioned" on the history following commit d, i.e. on "their" branch. Then it cherry-picks commits x, y, and z. In that situation, the change that you consider "theirs" is actually "ours" from Git's point of view, and your own change (those introduced by x, y, and z) are "theirs" from Git's point of view.

I suggest you live with "local" and "remote" for a bit less confusion.
-- Hannes
Previous: rupert THURNERNext: Philip Oakley
Message 2 of 4 in “configure remote/local as mine/theirs”
  1. rupert THURNERApr 11, 2020
  2. Johannes SixtApr 11, 2020
  3. Philip OakleyApr 12, 2020
  4. rupert THURNERApr 13, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.