0

I made a booboo in my project and would like to revert back to a previous commit. But I still would like to have my booboo files accessible for reference in the future. What should I do?

1 Answer 1

1

As long as your commits are reachable from a branch or tag, they'll never be garbage collected. The simplest thing would be to create a tag, e.g.

$ git tag mytag # optionally specify commit sha, default is HEAD
$ git reset --hard <new-sha>

Not the answer you're looking for? Browse other questions tagged or ask your own question.