0

I was learning magit and found this screenshot at Command to visit Github pull request of current branch with Magit:

enter image description here

I was wondering why we have Rebase and Push (and not just Push) at the top. What would be the difference in pushing vs rebasing in this instance? Thanks!

1

The upstream branch and the push-target are configured separately, that is why both values are displayed in the status buffer. These settings can point at the same branch, but for branches such as master, they tend to identify the same branch.

See The Two Remotes to learn about the upstream and the push-target. (The upstream actually can be a local branch, which is why I talked about branches instead of remotes above.)

See this qa for why the term "rebase" is used instead of "upstream".

2
  • Thanks so much. So I understand that when you say "upstream" and "push-target" you are talking about rebase and push. How are these configured separately? I haven't done any configuring. What are the default values and how do I configure them separately? Jan 13 at 8:13
  • 1
    The relevant git variables can be set from the "branch" menu. b u for the upstream, and b p for the push-target. Unless already configured, these removes can also be set from the fetch, pull and rebase menus. The magit manual has more information about these things (magit.vc/manual/magit/Branching.html) and I recommend also reading git documentation and/or tutorials about it.
    – tarsius
    Jan 13 at 12:25

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.