For those running a development version of git from master or next, you probably have seen it already. Today I was inspecting the git logs of git and found this little gem. It supports my workflow to the max.

You can now configure git status to compare branches with your current branch in status. When you configure status.comparebranches you can use @{upstream} and @{push} and you see both how far you’ve diverged from your upstream and your push branch. For those, like me, who track an upstream branch which differs from their push branch this is a mighty fine feature!

See this example:

$ git config --global status.comparebranches @{upstream} @{push}

$ git status
On branch ssh-wrapper_port
Your branch is ahead of 'upstream/master' by 3 commits.

Your branch is up to date with 'origin/ssh-wrapper_port'.

nothing to commit
Your stash currently has 2 entries

How awesome is that?!

The commits are introduced via d0413b31ddcce6ae6ffaff0a30a67ffbd1a7c648 in the git repo.