Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Create new branch from tag in Sourcetree

Hi @all,

creating a new branch from a tag is one of my most used git operations.

$ git checkout -b new_branch tag_name

How can I do this with sourcetree? Just right-klick on a tag name on the left pane dosen't give me this option ...

1 answer

1 accepted

4 votes
Answer accepted

When you (left) click on a tag in the sidebar it'll navigate to that point in the log. You can right-click on this commit in the log (indeed, on any commit) and select 'Branch...' to create a branch from that point.

Ah top! Thank you!

WHen i do this and try to push that branch up to origin i get this error git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --set-upstream origin 19.0:19.0 Pushing to error: src refspec 19.0 matches more than one. error: failed to push some refs to ''; Completed with errors, see above.

This is only part of the answer.  The method described above, branches only at the SHA.  Does not have an option for tracking.  Because Windows version (not sure about MAC) has an issue with "greyed" out tracking screen (will it ever git fixed :-)), there is a manual step of tracking the branch to the remote that can be done in the terminal shell.

git branch -u origin/<remote branch name> <local branch name>

This is for the case of an existing branch that is on the remote.

BTW - I have version of Sourcetree - when in the remote list on the left, right clicking does allow branch creation with tracking option.  This seems to answer the original post.  One thing that is missing from that process, is that there is no option for not checking out the branch.  If the checkout is done, at least tracking is available (not greyed out) .  Wish the two branch dialogs were consistent.  There are times when it is inconvenient to do a checkout, but still want to setup a local branch on the remote.  As for the tracking menu issue/bug/feature, that is another story.

PS - Just noticed that this was talking about tags (no children) ... my response was for an existing branch ...  still very similar..

Suggest an answer

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

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

3,390 views 4 5
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