Abort the merge
$ git merge --abort
Save current changes to a stash with a particular name
$ git stash save <stash name>
Save current changes to a stash (saves it as stash@{0})
$ git stash
Drop the stash at the top of the stack
$ git stash drop
Drop the stash at the nth index
$ git stash drop stash@{n}
Apply the stash at the nth index and delete from the list
$ git stash pop stash@{n}
Apply the stash at the nth index
$ git stash apply stash@{n}
Discards all the changes
$ git restore .
Create a new branch and switch to that branch
$ git switch -c <branch name>
Bring a single file to the working space from the stash
$ git restore --source=<stash@{0}> <filename>
Apply a patch file (.diff or .patch) to the repo
$ git apply <patch file>
Prettify the log history of git
$ git log --pretty=oneline