- git stash: records the current state of the working directory and index, but returns you to a clean working directory.
- git stash apply: applies the changes of a previously stashed state to the current working version. Leaves the stashed version in the stashed list. Can fail with conflicts.
- git shortlog: summarizes git log output grouped by author and title.
- git commit --amend: amend the last locally created commit that has not been pushed. In order to amend commits that have already been pushed, use --amend and then push with force. In order to modify older commits, use rebase.
- git reset --hard: resets the staging area to match the most recent commit and obliterates changes made since then. If a previous commit is specified, reverts to that commit and obliterates all commits after.
- git reset --soft: like reset --hard, but leaves the changes in place and uncommited.
- git reset --hard HEAD~2: specifies the number of commits back that you want to remove.
Find three different ways to display the git