git: Add track alias

This command lists all branches and what remote branch they are
tracking.
This commit is contained in:
2021-11-12 14:30:40 +01:00
parent a3e872556f
commit 2434f3fc4c

View File

@@ -16,6 +16,7 @@
[alias] [alias]
root = rev-parse --show-toplevel root = rev-parse --show-toplevel
spull = "!__git_spull() { git pull \"$@\" && git submodule sync --recursive && git submodule update --init --recursive; }; __git_spull" 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] [status]
submodulesummary = true submodulesummary = true
[diff] [diff]