puggsoy
puggsoy

Reputation: 1280

No branches in SourceTree?

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:

No branch

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

Answers (9)

Anurag Gupta
Anurag Gupta

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

Bernard
Bernard

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

Ravi
Ravi

Reputation: 180

This works for me: Goto Tools->Options->Git and select "Embedded".

Screenshot of Git tabn in source tree

Upvotes: 11

Eliezer Cruz
Eliezer Cruz

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

Alexander Larchenko
Alexander Larchenko

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

Andrei Karcheuski
Andrei Karcheuski

Reputation: 3306

Tools -> Options -> Git -> Push branches
Change from 'simple' to 'matching'

Upvotes: 21

Christian
Christian

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

mkarnovan
mkarnovan

Reputation: 61

I had the same issue. I was helped by removing git, and installing it again via SourceTree

Upvotes: 6

clemp6r
clemp6r

Reputation: 3723

You have to create at least one commit into your local branch before trying to push.

Upvotes: 9

Related Questions