Reverting to a previous commit
git revert --no-commit <SHA>..HEAD
e.g. use GitX to review commit history; copy the SHA of the last good commit that you want to go back to.
git checkout - How do I revert a Git repository to a previous commit? - Stack Overflow