How to get your changes back after an accidental hard reset in Git? If you made `git reset --hard` by mistake, possibilities are you can still get your commit back, as git holds a log of everything for a few days.
How to revert the last X commits? The simplest way of revering commits is to reset your head to the last commit you want and just discard the changes, here is how you can do it.