It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Persistent error when creating branch

My udemy tutorial did a bad job by giving poor guidance. Youtube don't have any proper examples. I keep getting this error message. See screenshot. I have tried reinstalling source tree and it persist. Is this by bad design or do i need to install anything else? i have tried different names and it just refuse to work. What's happening? 

 

error creating branch.JPG

1 answer

0 votes
Mikael Sandberg Community Leader Nov 18, 2019

Is this your first commit in the repository? Is so, Git will automatically create the master branch for you. Once your repository have at least one commit in it you can create new branches.

Hi Mikael,

Yes, the first commit and push both have error messages. Is this normal? If this is normal, then the error message is questionable. I followed the tutorial in another youtube video. I noticed that after i committed and pushed, the branch was created. So why does the error message appear?

Update: I've tried many more times and suddenly, the error disappeared. I have filed a bug report. I hope this can be investigated. Now sourcetree can create another branch even though my git commands are not complete. Why is this?

Mikael Sandberg Community Leader Nov 19, 2019

The error you first saw is expected, Git will not allow you to create a new branch until you have done a commit. The initial commit will create the master branch and once that is done Git will allow you to create a new branch. Branches in Git are just pointers to a commit, so if your repository is empty, there is no commit to point to.

What do you mean with that your git commands are not complete?

Ignore what I stated. I have opened another ticket as it suddenly worked without any reason/ explanation. See the next ticket I opened. It looks more like a bug now.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,970 views 0 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you