Undoing git commits is almost always a bad idea. The only time you should contemplate really undoing a commit is if the commit contains information that should never ever be seen in the repository. For example if you accidentally commit a file containing sensitive password information.
In all other cases, let the history stay as history. If the commit needs to be 'undone', create a new commit with the appropriate correction. This approach will keep things simple and stop you or other users of the repository getting into trouble. There are lots of articles available covering using git reset to achieve this sort of thing but we do not want to lose the history, we just want to return the branch to an earlier state as its 'latest' revision:
So, how do you undo a change without rewriting history?
This way the history remains consistent so you can recover from mistakes with correcting the mistakes. You can also relax knowing that only normal 'git pulls' are needed by other repository users to bring their working copies in line.
Australia: 07 3103 2894
International: +61 410 545 357