I've accidentally run the command against the wrong branch in my repository - is there a way to undo this change?
git revert just creates a new commit -- you can "remove" it with git reset --hard HEAD^ (be more careful with it, though!)
git revert
git reset --hard HEAD^