More Handy Git Stuff

02/22/20141 Min Read — In Ops, Resources

Recently I shared some scripts under Git Image Merge Conflict Tool and Quick and Dirty CI/CD Git Based Release Notes but I also have some git one liners that I use constantly that you may find useful. Check 'em out!

Search the repo for branches that contain a particular hash

git branch -avv --contains

Show all branches, sorted by recently changed

git for-each-ref --sort=-committerdate --format=\"%(committerdate:short) %(refname)\" refs/heads refs/remotes

Show recent commits without pager

git --no-pager log -n 10 --oneline --decorate --graph