DEV Community

Discussion on: How to Undo Pushed Commits with Git

Collapse
 
blackgirlbytes profile image
Rizèl Scarlett

Thanks @eberjoe ! That's correct. @vineetgnair I don't go too deep into it, but you can use any git revision with git revert.

You don’t have to use the commit hash to identify the commit you want to revert. You can use any value that is considered a gitrevision, including the:
Tag
Branch
Hash
Reference

And yes, you don't need to start from the top. I just start from the top in my example.