Re: configure remote/local as mine/theirs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 11.04.20 um 14:51 schrieb rupert THURNER:
> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux