• Git: Unadd files

    To unadd one or more files from staging use the command git reset HEAD <file1

  • Git: Undo last commit

    The last commit can be undone by a combination of git reset --soft HEAD~1 and git reset HEAD .. A more destructive approach is to use git reset --hard HEAD~1.