0

I messed up something badly and need to go back to a previous commit. I have looked around and tried lots of things with no success. How do I go back to commit 8add545108ce1a0d6ffebe891c112bb89ccbbae5 and make it my master on github? I can make it master locally but can't seem to get it to sync up with github.

The possible duplicate is not helpful in any way shape or form. I have already seen that and had no luck with it. I did not keep track of which 50 things I tried but I know that was one of them.

Kirbytech
  • 634
  • 1
  • 5
  • 18
  • 2
    Possible duplicate of [How to revert Git repository to a previous commit?](https://stackoverflow.com/questions/4114095/how-to-revert-git-repository-to-a-previous-commit) – Oliver Charlesworth Nov 13 '17 at 14:59

1 Answers1

2

This solved it for me, I had to play around till I got it to work though.

git revert --no-commit [commit]..HEAD

git commit -m "Revert back to [commit]"
Kirbytech
  • 634
  • 1
  • 5
  • 18