If you’re using git flow or any versioning system, it’s good to know how many merges are there with no version released. If the list is too long, it may mean that something is wrong with the project workflow.

This is what I use from time to time:

git log --oneline --decorate $(git describe --abbrev=0 --tags)..head --merges

shell alias will make it more accessible ;)

# git versions behind
alias gvb="git log --oneline --decorate $(git describe --abbrev=0 --tags)..head --merges"

This protip has been written in 474 seconds