When I’m working on a quick fix, it can be an annoyance to git add the file I was just working on. I just recently learned a little trick to bypass the staging area altogether.

You can run git commit -a to automatically add your working copy changes to the staging area and commit them. Note that this will only add changes from tracked files.

I often save unfinished work in a stash and later want to create a new branch from it. I used to create a branch and apply the stash until I stumbled upon this great shortcut:

git stash branch \<branchname> [\<stash>]

From the docs:

Creates and checks out a new branch named starting from the commit at which the was originally created, applies the changes recorded in to the new working tree and index. If that succeeds, and is a reference of the form stash@{}, it then drops the . When no is given, applies the latest one.