Git: Recent branches

  | #git#linux

Add the snippet as alias into ~/.gitconfig:

[alias]
    lb = !git reflog show --pretty=format:'%gs ~ %gd' --date=relative | grep 'checkout:' | grep -oE '[^ ]+ ~ .*' | awk -F~ '!seen[$1]++' | head -n 10 | awk -F' ~ HEAD@{' '{printf(\"  %s\\n\", $1)}'

Inspired by Scott Stafford

About Vladislav Bochenin

Photo of Vladislav Bochenin

Writing code more than 18 years and raising a son last 9 years.
So I more experienced in coding than raising.