Reputation: 1280
I have a project on my PC, I want to host it on BitBucket as a Git repo. I've been using SourceTree to manage an existing project with other contributors, so I know the basics about modifying a repository, but I haven't made my own one before.
What I've done so far was make a brand new repo on BitBucket, then I went in SourceTree and made a new one in there. I added a remote called origin
using the URL BitBucket gave me, but when I try to push I see this:
Usually I'm supposed to choose which branches to push, but here I don't see any. Apparently I'm on master
though, which it shows in the left pane.
Basically, I'm confused. Can anyone explain what's going on or what I'm supposed to be doing?
Upvotes: 10
Views: 15288
Reputation: 41
I have fixed the issue by using fetch option .It fetches all the branches and then i have set the Tools > Options > Git > push branches to simple.
It starts working fine now
Upvotes: 2
Reputation: 485
If you have removed the origin branch. In the terminal, run command "git branch --unset-upstream" Then restart SourceTree and try to push.
Upvotes: 0
Reputation: 1
I have updated and it has not worked for me. I have switched to System and back to Embedded and this has worked for me.
Upvotes: 0
Reputation: 1
This bug appeared after updating Sourcetree to v 3.2.6.3544 while using System Git v 2.12.0
Updating System Git to v 2.24.0 fixed the issue.
Upvotes: 0
Reputation: 3306
Tools -> Options -> Git -> Push branches
Change from 'simple' to 'matching'
Upvotes: 21
Reputation: 124
I had the same issue after updating SourceTree to version 3.2.6. Updating SourceTree did not update the embedded git client automatically.
Updating the git client manually via Tools > Options > Git > Update embedded solved the problem.
Upvotes: 4
Reputation: 61
I had the same issue. I was helped by removing git, and installing it again via SourceTree
Upvotes: 6
Reputation: 3723
You have to create at least one commit into your local branch before trying to push.
Upvotes: 9