Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 21:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hello,
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?
Thanks,
Ramiro
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is not working fine. For sure the most intuitive behavior is to push immediately to the tracked branch instead of creating another branch with the same name.
It's a very annoying bug indeed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.