When I open the commit dialog there is a checkbox at the bottom of the screen to "Push commits immediately to [heroku]." Heroku is selected because it is the first repo in my list. The second repo is bitbucket. My question is: Is there a way to make heroku the second repo and bitbucket the first? I want to push commits immediately to bitbucket, but every time I open the commit dialog I have to select bitbucket instead of heroku at the bottom.
I tried removing heroku and re-adding it. That looked like it had fixed it, but when I brought up the commit screen the next time the order of the repos had switched again. Heroku always ends up at the top. How is that?
SourceTree should be listing the remotes in the same order reported by 'git remote' - however it prefers a remote called 'origin' (for git) or 'default' (for hg), so if you rename the remote you use most to that then it will always be selected by default.
It lists 'origin' in my git repo last! And the other two remotes are swapped compared to `git remote` output.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This doesn't work. See my answer for what actually works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
None of those answers worked for me. It looks like the order of preference is alphabetical. I fixed the problem by removing remotes with names that appear before "origin" (the remote picked by default started with 'j') and then re-adding them with names prefixed with "z-". It's stupid, but it worked. Note: I tried just renaming, but that didn't work. I had to remove and re-add with the new name.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What worked for me was going to 'Repository Settings' then click 'Edit Config File' and set the 'remote' property of the master branch to the alias of the repository I wanted it to select first. See if this helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is ultimately what I had to do as well. Not sure how it got out of whack though.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes - this fixed it for me. Shouldn't this be made editable via UI within Sourcetree?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not working for me either.
Sourcetree order:
bill fork trunk
git remote order (alphabetical?):
fork bill trunk
It would only be a minor annoyance if it was just the display order, but it seems like this order is used for things like the Push dialog, too. I don't want to accidentally be pushing branches to coworkers' remotes.
The ability to customize the order via drag and drop would be ideal. Alternatively just using the order the remotes were added in sourcetree would be interesting. Prioritizing keywords like origin fork and trunk is another alternative but not very straightforward and what about subordering of origin, fork, trunk?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hm, that's not workting for me:
» git remote
attic luke maciej michal nico sas we7
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You have to remove the remote you'd like to use as default and then re-add it. This should make the it the top of the list and thus default.
Note: If this doesn't work, then you'll have to remove all remotes and readd them, while making sure to add the prefered one last.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any updates on this?
SourceTree remotes list definitely does not match the order listed via git remote...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is an issue for me too, my case scenario is that I have two Git remotes (staging, production) and will like to set a default remote (the one I push 99% of the time) instead of choosing which remote everytime I push.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Renaming "trunk" to "origin" doesn't change the order for me.
bill fork origin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The only thing that worked for me was renaming my primary repository to "origin".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Neither working like expected for me.
git remote:
on Sourcetree:
Annoying to change the remote every single push. :/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is actually a big problem for me as I have one repo I push to 99% of the time. Naturally the other one shows up on top. I had to just delete the 1% repo for now rather than accidentally push to it all the time.
When I am able to push automatically after a commit it does go to the correct repo (the one the branch was created from). But when I have to use the push dialog it picks the wrong branch. Why is that?
Please allow at least a default REPO, or if not set the order. Or pick the same repo in the push dialog that the commit + checkbox to automatically uses - if that makes sense.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.