Search code examples
git-gui

Meaning of local or remote in git gui


I am somewhat confused what local / remote version means for git gui. At times remotes are my changes and at others local are. Is there any logic behind this naming/handling?


Solution

  • It would depends where, on git-gui you see "local" and "remote".

    The only aspect of git where those two terms reference different changes is on a diff view, where local and remote are reversed during a rebase.

    See "git rebase, keeping track of 'local' and 'remote'"

    A rebase switches ours (current branch before rebase starts) and theirs (the upstream branch on top you want to rebase).
    In a GUI mergetool context:

    • local references the partially rebased commits: "ours" (the upstream branch)
    • remote refers to the incoming changes: "theirs" - the current branch before the rebase.