Safest option to undo commit and leave everything intact:

git reset --soft HEAD^

See this for more info.