From 2434f3fc4ce07be214f09b6629cceee3949f6caa Mon Sep 17 00:00:00 2001 From: druckdev Date: Fri, 12 Nov 2021 14:30:40 +0100 Subject: [PATCH] git: Add `track` alias This command lists all branches and what remote branch they are tracking. --- .config/git/config | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/git/config b/.config/git/config index a1b8d8a..b177990 100644 --- a/.config/git/config +++ b/.config/git/config @@ -16,6 +16,7 @@ [alias] root = rev-parse --show-toplevel spull = "!__git_spull() { git pull \"$@\" && git submodule sync --recursive && git submodule update --init --recursive; }; __git_spull" + track = "!track() { git for-each-ref --format='%(upstream:short) <- %(refname:short)' refs/heads | sort | awk '{ print $3,$2,$1}' | column -t; }; track" [status] submodulesummary = true [diff]