undo git

Shell
# KEEP CHANGES
git reset --soft HEAD~1

# REMOVE CHANGES
git reset --hard HEAD~1
Source

Also in Shell: