Skip to content

Instantly share code, notes, and snippets.

@pratheeshrussell
Created March 23, 2023 04:14
Show Gist options
  • Save pratheeshrussell/33032733a099c9d1d6b15c899d064962 to your computer and use it in GitHub Desktop.
Save pratheeshrussell/33032733a099c9d1d6b15c899d064962 to your computer and use it in GitHub Desktop.
Git alias that I use for projects
[alias]
# Prints current branch
cbr=rev-parse --abbrev-ref HEAD
# prints the branches sorted by commit date and coloured
br=branch --sort=-committerdate --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment