Bitbucket: How to download the latest branch onto my local machine?

I'm in deep trouble... I have the latest and greatest branch in my remote Bitbucket repo. How do I get that branch loaded onto my local machine, without the conflict marks?

<<<<<<< HEAD
    
=======
>>>>>>> 1.9.31

I've also accidently deleted the local repo! How do I get everything back the way it was this morning?

3 answers

1 accepted

This widget could not be displayed.

You probably want "git reset --hard". This will clear all working directory changes.

Thanks for your input.. I wound up getting the latest correct version from TIme Machine... I'm good to go now, but not so sure I'm gonna continue using Git...

From Time Machine? So either you didn't actually want exactly what was in the remote repository, or you had it at some point and then modified your files. The diff in the original post looks like a line break is added/removed. Any versioning system worth its salt is going to treat whitespace changes as changes.

This widget could not be displayed.

What is the name of the "latest and greatest" branch? Which command are you running that results in the conflict?

In terms of repo deletion, did you have any local commits or changes that were not pushed to any remotes? If so, you'll want to pursue file recovery tools. If everything was pushed, you should be able to restore by cloning and checking out the appropriate branches.

This widget could not be displayed.

Latest and greatest: 1.9.3 (1.9.31 was the exact duplicate of 1.9.3, so I deleted it) :-{

Apparently a merge didn't finish, so I have all of these conflict markers...

From what I can tell, all of my changes were committed and pushed to the remote (Bitbucket), because I can see them when I look at the remote branch source.

The question is: how do I get a copy of EXACTLY what's in the remove branch 1.9.3 WITHOUT all of the conflict markers (they don't appear in the source in Bitbucket, so who/what is putting them there? and how do I get a clean copy of the remote branch?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,214 views 8 11
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