git: Add an alias for getting branches recently updated

This commit is contained in:
Sanchayan Maity 2023-06-17 11:21:22 +05:30
parent 89dd0df8a1
commit 3421c83582
Signed by: sanchayanmaity
GPG Key ID: 6F6A0609C12038F3
1 changed files with 6 additions and 0 deletions

View File

@ -3,6 +3,12 @@
addIgnoredFile = false
[alias]
jump = !/usr/share/git/git-jump/git-jump
# Based on https://stackoverflow.com/questions/5188320/how-can-i-get-a-list-of-git-branches-ordered-by-most-recent-commit
recent = "!rb() { \
git branch --all --color=always --sort=-committerdate \
--format='%(HEAD) %(color:bold green)%(committerdate:relative)%(color:reset)|%(color:yellow)%(refname:short)%(color:reset)|%(subject)' \
| head -n ${1:-15} | column -ts'|'; }; \
rb"
[blame]
# Mark any lines that have had a commit skipped using --ignore-rev with a `?`
markIgnoredLines = true