I want to undo the two most recent commits. These commits have already been pushed to the remote repo, but I suppose once I’ve undone them locally, I can push again, again they will effectively be undone in the remote repo.
I have the hashes for these commits, so what command do I need to run to undo them?
Just do:
Using
git help revertwill give you more details.If you have pending changes in your working directory, stash before and unstash after.