From fe3adb9d0be5f0b4d31ee0295318aa3f29c815e7 Mon Sep 17 00:00:00 2001 From: Aurelien Gateau Date: Tue, 18 May 2021 20:42:54 +0200 Subject: [PATCH] Add a script to list git branches and their age Useful to find forgotten stale branches. --- git/git_branch_age.nu | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 git/git_branch_age.nu diff --git a/git/git_branch_age.nu b/git/git_branch_age.nu new file mode 100755 index 0000000..43dd136 --- /dev/null +++ b/git/git_branch_age.nu @@ -0,0 +1,6 @@ +# Creates a table listing the branches of a git repository and the day of the last commit +git branch | lines | str substring 2, | wrap name | insert "last commit" { + get name | each { + git show $it --no-patch --format=%as + } +} | sort-by "last commit"