Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Rolf Marsh February 2, 2014

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

0 votes
Answer accepted
Seth
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.
February 3, 2014

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

Rolf Marsh February 3, 2014

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...

Seth
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.
February 3, 2014

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.

0 votes
Rolf Marsh February 2, 2014

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?

0 votes
Seth
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.
February 2, 2014

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events