From 3271746fe4598cb8c622ac15d6fc9734a4a6d311 Mon Sep 17 00:00:00 2001 From: Anton Bobov Date: Sun, 13 Jun 2021 16:21:22 +0500 Subject: git: add alias for list local branches with a date of last commit. --- files/.gitconfig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'files/.gitconfig') diff --git a/files/.gitconfig b/files/.gitconfig index 00c311a..f742e94 100644 --- a/files/.gitconfig +++ b/files/.gitconfig @@ -76,6 +76,8 @@ mr = !sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' - mr-clean = "!git for-each-ref refs/heads/mr/* --format='%(refname)' | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done" + recent = "!git for-each-ref --color=always --sort=-committerdate refs/heads --format='%(HEAD)%(color:yellow)%(refname:short)|%(color:magenta)%(authorname)%(color:reset)|%(color:bold green)%(committerdate:relative)|%(color:red)%(objectname:short)%(color:reset)'|column -ts'|'" + [advice] statusHints = false detachedHead = false -- cgit v1.2.3