I’m going to talk about changing SourceTree’s default remote.
When you’re pushing a new branch, SourceTree will automatically guess which remote you wish to push to by default.
SourceTree defaults to
By default SourceTree will always pick
origin to push a new branch to. Depending on your workflow, you may want to set another remote as your default, let’s say
my-fork for instance.
Renaming a remote
Interestingly all we have to do is rename our remotes. Since SourceTree always picks
origin we just need to rename to anything else. Perhaps to the name of owner of the repo like
(I’ve never been a fan of “
origin“, it’s terribly confusing and ambiguous for those learning git).
Steps to rename the remote
git remote rename origin SproutSocial
- Open the repo settings (gear in top right)
- Click on the remote
- Change the
Changing SourceTree’s Default Remote
Once we’ve renamed
origin, SourceTree will always pick the remote that comes first alphabetically. So, do the ‘ol classic prefixed by numbers. Here I’ll name them
Boom! SourceTree picks
01-my-fork by default!
Simple workflow optimizations like this, make me happy.