sublimehq / sublime_merge

Issue tracker for Sublime Merge
https://www.sublimemerge.com
273 stars 14 forks source link

Local branch pushing to wrong remote. Can't set correct upstream #1713

Open rumble19 opened 1 year ago

rumble19 commented 1 year ago

Version info

Description

I have a local branch named "staging". It is set to track my remote "staging/master". I can set the upstream correctly and verify in the .git/config file and in the console that it is set correctly. However, when I go to push, I can see from the tooltip if I hover over the push button, or if I watch the console, the command that is executed is "git push staging staging" which creates a new branch on my staging remote called staging.

Expected command to execute would be git push staging staging:master

Steps to reproduce

Steps to reproduce the behavior:

  1. Open repository ...
  2. Add remote named staging that has an existing branch named master
  3. Add a local remote named staging
  4. Right click local staging branch, set upsteam to staging/master
  5. Push a commit, notice staging/staging has been created

Expected behavior

Commit is pushed to staging/master.

Screenshots Setting upstream: image Overview of branches: image Confirmation of upstream being set correctly: image Wrong command being previewed: image

If applicable, add screenshots to help explain your problem. This section may be omitted/removed.

dpjohnst commented 1 year ago

Hi @rumble,

Thanks for reaching out!

Sublime Merge should respect the git config value push.default when determining where to push to (see: https://git-scm.com/docs/git-push#Documentation/git-push.txt-pushdefault).

Could you confirm what the output of git config push.default when run inside your repository?

Thanks, - Dylan from Sublime HQ