The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Clone - when there are un-merged branches

TrevorBStokes
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 30, 2015

My BitBucket repo has two branches: Master and ContinuedCleanup. Should I be able to clone the whole current state and checkout either on my local machine?
I did the clone from a shell, using the command Bitbucket generated, and then started gitk and git-gui. If I try to checkout ContinuedCleanup I get the message "You are no longer on a local branch." I checked the box "Tracking Branch."

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Tim Crall
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 Champions.
November 30, 2015

By default, clone only clones down the master branch.  However on current versions of git, attempting to checkout a remote branch should cause it to automatically fetch the remote branch and start tracking it locally.  I'm not specifically familiar with gitk and git-gui, but that's the standard behavior of the git command line itself.

If it's not working, you may want to try doing an explicit pull of the branch.

TrevorBStokes
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!
December 8, 2015

Thanks. I think I solved this by doing a fetch and then activating the branch I needed.

TAGS
AUG Leaders

Atlassian Community Events