0

I have 2 branches (B1, B2)

            B1 
           /   
C1 - C2 - C3
           \
            B2

and I was changing them by turns (checkout->amend->checkout->amend->...). But after a certain time it was a mess, I have to start from the beginning. I found a certain commit in git reflog that was OK yet. But how to restore both branches to the commits where that certain commit happened?

user3719454
  • 994
  • 1
  • 9
  • 24
  • Possible duplicate of [How to move a branch backwards in git?](http://stackoverflow.com/questions/2923055/how-to-move-a-branch-backwards-in-git) – Mchl Oct 05 '15 at 12:34
  • this possible duplicate is not what I want – user3719454 Oct 05 '15 at 12:41
  • `git reset --hard` is the way to do so. If that doesn't work for you, then you should explain in more details what the "mess" is, and the result you want. – SirDarius Oct 05 '15 at 13:33
  • 1
    @user3719454: from your description it sure looks like that is what you need. If not, please provide more details in your question. Close vote retracted. – Mchl Oct 05 '15 at 13:51

0 Answers0