Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Adam Jakab May 4, 2014

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

1 vote
Answer accepted
KieranA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 5, 2014

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.

Cheers

Adam Jakab May 5, 2014

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

Adam Jakab May 5, 2014

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

4 votes
XaeroDegreaz July 29, 2014

You can fix this issue by going to:

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


0 votes
SimonW July 6, 2014

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".

SimonW July 6, 2014

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.

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 6, 2014

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

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 6, 2014

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.

SimonW July 7, 2014
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

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 7, 2014

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events