List merge commits between two branches in Git

This handy snippet is useful for seeing what merged PRs there are between two branches – eg master/release or whatever you’re using. I find it v.handy:

git log --merges --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative origin/production..origin/master

Leave a Reply

Your email address will not be published. Required fields are marked *