git revert doesn't undo a commit though— it creates a new commit that undoes it. That might be what you want under some circumstances, but most of the time that I want to revert it's a commit I just made and haven't pushed yet, so I just want to pretend it never existed.
What's wrong with just working on and when the changes finally look like they should just do a `git commit --amend`?
Or if the commit should for some strange reasons really never exist just move HEAD one commit back. You could even get the changes back by merging the "bad" commit back without committing the merge (using the `--no-commit` switch).
mikepurvis|3 years ago
pooper|3 years ago
Known issue: can't undo all the commits.
still_grokking|3 years ago
Or if the commit should for some strange reasons really never exist just move HEAD one commit back. You could even get the changes back by merging the "bad" commit back without committing the merge (using the `--no-commit` switch).
zeroonetwothree|3 years ago