7

Can someone explain what the top three lines of the magit status buffer mean? Especially Merge: origin/master Commit message

Head:     master Commit message
Merge:    origin/master Commit message
Push:     origin/master Commit message

Using the console my working directory seems clean and everything is pushed/pulled to/from my remote, so why does the Merge appear in magit status?

7
  • The Head line shows information about the HEAD commit. It doesn't say Branch instead because HEAD may be detached.

  • The Merge line does not indicate that a merge is in progress. It simply shows the upstream branch of the current branch. The prefix used for that line to be Upstream, but now Merge or Rebase is used, additionally informing you how upstream changes are pulled into the current branch.

    (If you want to rebase by default, then you should set branch.<branch>.rebase or pull.rebase accordingly. You can do that from the branch popup b or the branch config popup b C.)

    When a merge is in progress, then a "progress section" is shown in the status buffer, but that comes further down and lists the commits that are being merged like so:

_

Merging np/submodules (3)
368a666 * origin/np/submodules np/submodules Reorganize submodule popup
c2a58fc * magit-submodule-popup: move (i, s) to nested popup
51c0564 * Add new submodule section type
  • The Push line is about the branch that that the current branch is being pushed to. When using a triangular workflow then the "target of push" is usually different from the "upstream". Long-lived branches such as master are the exception to that rule, so for those branches a bit of redundant information is being displayed.

    To learn more about triangular workflows and the use of the "push-remote" in Magit (and Git), see this brief introduction in the Magit manual.

  • If Merge: shows the upstream branch of the current branch then what does Push: show? – eflanigan00 Sep 26 '17 at 2:26
  • @eflanigan00 In case you weren't notified: see expanded answer. – Basil Sep 26 '17 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.