Is it possible to modify the "push changes immediately" option?

The "Push changes immediately to" checkbox gives me the option to push my commit immediately, but it offers me the wrong remote.

Is it possible to configure this option to use a specific remote?

My current branch is origin/master, the option offers me the demo/master branch. (my repo have two remotes: demo and origin, both have master branch)

Thanks in advance!

3 answers

1 accepted

Hi Adam,

This will always work for your 'origin' remote. You could change your origin by going into your repository settings and changing the names of the remotes to switch to the remote you always want to push to. Generally this is the default because that's the remote you usually push to.


If I change my origin remote's name to 'default', then I see the "push changes immediately" option as default/master but then immediately changes to demo/master

After several restarts now it's working with the name "default", thank you for the answer!

You can fix this issue by going to:

Preferences > Git > Set "Push branches" to "upstream"

I'm having the same issue. The remote branch that's shown here is stuck on the wrong remote branch "tony.t/master" when the branch is tracking "origin/master". I've tried set the branch to track different remote branches, and even deleted and recreated the branch but it stays stuck on "tony.t/master".

My `~/.gitconfig` has `push.default = matching`, which matches the setting in SourceTree prefs. I can confirm that running `git push` on the command line does push to the correct remote branch, as opposed to SourceTree, which doesn't.

Interestingly, the prefs dialog doesn't work for me. When I open it it can't be closed. Even after restarting and closing all the open windows. Maybe the prefs need to be cleared? I tried trashing `~/Library/Preferences/com.torusknot.SourceTreeNotMAS.plist` but didn't help.

Try modifying your git configuration file manually. If necessary, you can find it through the SourceTree options dialog.

push.default isn't really relevant. It effects which branches get pushed, not which remotes they get pushed to.

Check out this answer from stack overflow.

Yeah, thats not it (I do know how to use git). Heres the section fir that branch:
[branch "master"]
	remote = origin
	merge = refs/heads/master

Sounds like a SourceTree bug. I'd file a report at Post a link to the bug report here so others can vote it up.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

1,110 views 4 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you