Maybe I am wrong and this is the desired behavior, but I think the "Push commits immediately to" is not working fine when you have a local git branch tracking a remote branch with a different name.
In this case when you commit ant check the "Push commits immediately to" I was expecting that my commit will be pushed to the followed remote branch (remember with a different name than the local one), but instead a new remote branch is created with my local name at origin. Is this the expected behavior or is this a bug?
I've recently started renaming my local branches to be more descriptive of which issue I'm tracking. When you commit, and then use the "Push immediately to..." function, it wants to create a remote branch with the same name. This is quite bad, as it has completely made me look like a noob the past couple days as I was committing away without first checking.
If you right-click on the branch in the sidebar, you can select the "Push to [...] (tracked)" option. It seems pretty inconsistent. At the very least there should be another checkbox in the commit window that allows us to choose to push to the tracked branch, or a branch named the same as our local branch.
To fix the issue so that the commit window always uses your tracked branch, you can go to
Preferences > Git > Set "Push branches" to "upstream"
This solves the problem.
I noticed also (at least now, not sure if this was also true with the latest sourcetree version when I posted the question) that you can be sure before the commit where the changes will be pushed because the message near the checkbox tells you...
Push changes immediately to branchName
And you can see that branch name changes from your local one to the remote one when changing the configuration like xaero indicated.
Thank you very much.
Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG