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 folder
3. copied files into the newly created folder where the .git directory was created
4. using SourceTree, staged all of the files
5. 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this solution, it worked for me (at least partially):
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This worked for me:
I tried upgrading the Embedded Git used by SourceTree
(Tools => Options => Git => Update Embedded Git)
Thanks for the link
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But now I get this error when I try to push:
git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags --set-upstream <repository-name> master:master
Pushing to bitbucket.org/<my-name>
fatal: 'bitbucket.org/<my-name>' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Completed with errors, see above.
where <repository-name is the name of the repository I am trying to commit to and <my-name> is the name added to the bitbucket url . Both exist at bitbucket.org.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've tried both system git (updated to 2.23) and embedded git (2.21) and neither solved the problem for me. I'm having the problem with both ssh and file system origin repos.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I discovered a way to "fix" the problem that is probably also a clue for the bug.
If I set my new branch to track an existing remote branch (doesn't matter which branch) then immediately change it back to track "None", it then shows up in the push dialog.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're right, I have the same issue and upgrading Git didn't work, but the trick of tracking/untracking branches did it! Thanks a lot!
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.
The trick of tracking/untracking branches worked for me also.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It looks like Atlassian has made a new release of SourceTree:
https://product-downloads.atlassian.com/software/sourcetree/windows/ga/ReleaseNotes_3.3.4.html
Has anyone tested whether it fixes this problem of first time local branch not showing in Push Dialog?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'd like to try it out, but can't find how to download version 3.3.4 of SourceTree.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This solution worked for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
[SOLUTION - setting the merge property in .git/config file]
For me, nothing else worked. So I get into the .git/config file:
The problem there was that the branches didn't have the merge property at all. It was like that:
[branch "feature/labels"]
remote = origin
[branch "feature/interaction-tools"]
remote = origin
The solution was to set the merge property:
[branch "feature/labels"]
remote = origin
merge = refs/heads/feature/labels
[branch "feature/interaction-tools"]
remote = origin
merge = refs/heads/feature/interaction-tools
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For me, this setting works (Embeded Git 2.30.2, SourceTree 3.4.4):
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this worked for me. Thank you so much
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This also worked for me. Thanks :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This worked for me, thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
(Tools => Options => Git => Update Embedded Git)
I did this in SourceTree 3.4.16. Embedded Git version was about 2.6 then 2.37.
Now I get several Git errors and SSH agent isn't working either anymore.
Reinstalling SourceTree did not solve anything yet. Now my SourceTree is completely destroyed 😑.
Edit:
After the reinstall of SourceTree I did "Update Embedded Git" again and then clicked on "Embedded". Now everything works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried in tool option and then it worked for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This solution worked for me also.
My "System" Git installed by "Docker Toolbox" was "git version 2.9.0.windows.1".
Thanks for capture!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same problem here, and this solution worked for me too!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks! Selecting system made it work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Selecting the "Update Embedded" in the Tools > Options > Git dialogue worked for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks. Solution worked for me too!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes solved the issue. Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Selecting Embedded and restarting SourceTree worked for me. Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This worked for me, thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Worked for me too!!!! many thanks!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Worked for me ~ Thanks~
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
selected Embedded and it works again, thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks! Works for me as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Worked for me, thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had a similar problem, but changing simple(which was the default setting) to matching worked for me! XD
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried a bunch of the suggestions here, but this is the one that worked for me - although, I changed the setting from 'simple' to mixed. I suspect therefore that the setting itself isn't the issue, but changing it triggers some kind of refresh.
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.
This was the way that solved it for me, also.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have tried:
- Check (Tools -> Options -> Git -> Push branches)
- Change this setting from "matching" to "simple"
- 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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
GIT UPDATE solved this for me :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same issue here, I just:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
我通过更新git修复了这个问题
git 2.11=>Git-2.29.2.3-64-bit
我的版本是 SourceTreeSetup-3.3.9
感谢大家
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
had the same issue here on windows, switch git to embedded version works for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.