What is fast and safe way to revert code from git repo

Viewed 113

By mistake I have pushed changes to git repo..now I want to revert it back.

So what is fast and safe way to do that.

I know about to reverse it but I would like to know about easy, fast and safe way.

Thanks

1 Answers

you can use for keep your changes in stage area

Mixed Reset

git reset --mixed [commit id you want to reset here]
Related