Git Pull dialog works fine.
However when I press the Push button, the Push dialog shows me an empty list of branches when I am expecting a list of branches available to push
In my case it was caused by an older version of git (prior to 2.13.0) not understanding the format option to git branch command. Upgrading to Git 2.23.0 solved the problem.
I am running 3.2.6 and have the same issue. Steps:
1. created repository on bitbucket.org.2. cloned repository to local machine to an empty folder3. copied files into the newly created folder where the .git directory was created4. using SourceTree, staged all of the files5. entered commit comment and clicked the commit button (lower right)6. tried to Push commited files
Result - the push dialog with no branches listed and just a blue spinny for-ever.
Try this solution, it worked for me (at least partially):
https://community.atlassian.com/t5/Sourcetree-questions/Push-does-not-work-since-3-2-5/qaq-p/1152545#M31058
This worked for me:
I tried upgrading the Embedded Git used by SourceTree
(Tools => Options => Git => Update Embedded Git)
Thanks for the link
I tried in tool option and then it worked for me.
Updating SourceTree or the embedded git didn't solve this issue for me.
Instead, I followed Jason Paulson's comment in a related thread:
- Check (Tools -> Options -> Git -> Push branches)
- Change this setting from "matching" to "simple"
- EDIT: If this setting was already on "simple", try switching it to "matching" (and then back to "simple" if you want)
This solution worked for me also.
My "System" Git installed by "Docker Toolbox" was "git version 2.9.0.windows.1".
Thanks for capture!
Same problem here, and this solution worked for me too!
Thanks! Selecting system made it work.
GIT UPDATE solved this for me
Yay!...this is the real solution (at least for me).
Here's a little additional information on this issue that I discovered:
The underlying issue is that when using the "matching" setting, the SourceTree push dialog only displays branches that have [branch] entries in the .gitconfig file. My previous solution of manually setting and unsetting the remote tracking branch works because it's causing an .gitconfig entry for the branch to be created.
I branched local/[mybranch-didnotpush] to local/[mybranch-thiswillpush], and and pushed local/[mybranch-thiswillpush] to origin/[mybranch-didnotpush]. Then I deleted local/[mybranch-didnotpush], and renamed local/[mybranch-thiswillpush] to local/[mybranch-didnotpush]. Now local/[mybranch-didnotpush] does push.
My issue is when I tried to push the second time(the first time the branch showed up and I was able to push), the branch was not listed. So I updated embedded git, did not work. Then I changed Tools->Options->Git->Push branches from simple to matching. The local branch showed up.
I had a similar problem, but changing simple(which was the default setting) to matching worked for me! XD
had the same issue here on windows, switch git to embedded version works for me.
I had recently updated SourceTree to 3.3.8. I found this problem of local branches to be pushed dialog being empty. I followed the suggestioon to upgrade Git. I went from 2.12.2 to the latest version, which is 2.25.1. Closed STree and Git. Re-opened both and now STree displays all available branches.
I'm happy.
For me, the problem was that the local and the remote branch names didn't match! I simply renamed my local branch (named it exactly the same as remote one) and my local branch magically appeared in the list.
我通过更新git修复了这个问题
git 2.11=>Git-2.29.2.3-64-bit
我的版本是 SourceTreeSetup-3.3.9
感谢大家
Same issue here, I just:
I have tried:
- Disabling LibHit2 integration
Didn't work.
- Updated git to 2.30 (having Sourcetree 3.4.3)
That worked, for a time. Now I realized I had git problem which was solved by bash command from local git repo:
git push --set-upstream origin master
(or any other branch name)
You can also right click the branch and select "track remote branch"->"origin/master", then the push button will have number appeared and when you click the push button, your branch will be in the list.
It looks like you're new here. Sign in or register to get started.