How to create a branch from a given commit in the Stash UI?

Neil
Contributor
June 11, 2015

Given a certain commit, that is not referenced by an existing branch or tag, is it possible to create a new branch from that commit?

I know you can do this from Git...

I know you can also do this using the Branch Utils in the Stash API...

But I am specifically asking if it is possible to do this from the Stash UI itself?

I can branch from a tag or another branch, but I can't figure out how to branch from a little ol' commit hash.

Thanks

2 answers

8 votes
Kevin Neal
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 27, 2017

It can be done through the web UI.

When viewing the commit, add a tag (right hand side).

Click on the commit to view the commit history, then click the ellipsis next to the tag name and choose "Create branch from here"

Mat Marlow
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 24, 2017

Good tip! 

A clarification for the latest UI though (I couldn't find the things you describe)...

"Click on the commit to view the commit history, then click the ellipsis next to the tag name and choose "Create branch from here"

When you've created a tag, and need to create a branch from that tag, simply do this...

  • Go to "Branches"
  • Click "Create Branch" (top right)
  • In the popup window, use the "Branch from" dropdown to select your tag
  • Add a name for your branch and click "Create"
Like # people like this
Mike Ellertson
Contributor
July 10, 2018

Great tip!  I had the same problem.  Your solution solved it for me!

Sudhir
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 28, 2019

I had the same need, and this post helped me create a branch with the specific commit I wanted, in minutes! Thanks a ton.

rhafiko
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 20, 2020

you saved the day. thank you so much.

1 vote
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 11, 2015

You cannot do this from the Stash web UI, it only allows you to create branches at the tip of another branch.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events