Cover Image: Git Alias
Photo by Yancy Min on Unsplash

Git Alias

Tomas Norre • February 3, 2025

development devops

Git is an amazing tool, I personally use a git wip alias all the time, which gives a nice overview of which branches have been worked on lately.

$ git wip
  6 months ago  ci-phpstan-fix
  4 months ago  bugfix/update-label
  4 days ago    v11.x
  2 days ago    main

You can add following to your ~/.gitconfig save and volá you're done, and ready to use it.

[alias]
  wip = for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads
If you find any typos or incorrect information, please reach out on GitHub so that we can have the mistake corrected.