Clone - when there are un-merged branches

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

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.

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

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

699 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot