Joined May 2016
·

travisspencer

Twobo
·
Sweden
·
·
·

To make this work for only branches that I have committed code on, this is what I settled on:

git config --global alias.recent-branches "! git for-each-ref --sort=-committerdate --count=15 --format='%(authorname),%(color:bold yellow)%(refname:short)%(color:reset) (%(color:bold magenta)%(committerdate:relative)%(color:reset)) %(color:cyan)%(objectname:short)%(color:reset) - %(color:dim white)%(contents:subject)%(color:reset)' refs/heads/ | grep ^Travis | cut -d, -f2-"

This shows:

  • branch name (in yellow)
  • when it was modified (relative to now and in purple)
  • the hash (in cyan)
  • the message from the last commit (in grey)

Change the grep command to use your username if you adopt this approach.

This shows all recent branches that anyone has modified. How do I limit it to just the ones that I've worked on?

Achievements
1 Karma
0 Total ProTip Views
Interests & Skills