The git revert command undos one specific commit. It will add a new commit which is the opposite of the commit being undone. If you added a line, it will remove a line. If you removed a line, it will add a line.
If you need to revert to a specific commit so that the state of your repository is exactly as it was at that commit, follow this advice from StackOverflow.
http://stackoverflow.com/questions/1895059/git-revert-to-a-commit-by-sha-hash
# reset the index to the desired tree
git reset 56e05fced
# move the branch pointer back to the previous HEAD
git reset --soft HEAD@{1}
git commit -m "Revert to 56e05fced"
# Update working copy to reflect the new commit
git reset --hard