git:alias: Add branches as alias for track
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
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),%(refname)' refs/heads refs/remotes | sort -d | sed -E 's:(^|,)refs/(heads|remotes/):\\1:g; s:^,([^/].*):\\1,:; s:,/:,:' | sed -Ez 's:(^|\\n)([^,]+),\\n\\2:\\1\\2:g; s:(^|\\n)([^/,]*)([^\\n]*\\n\\2(,|/))*:\\n&:g; s:\\n+$:\\n:' | (echo remote,local; cat) | column -tdLs, -Na,b -Ob,a; }; track"
|
track = "!track() { git for-each-ref --format='%(upstream),%(refname)' refs/heads refs/remotes | sort -d | sed -E 's:(^|,)refs/(heads|remotes/):\\1:g; s:^,([^/].*):\\1,:; s:,/:,:' | sed -Ez 's:(^|\\n)([^,]+),\\n\\2:\\1\\2:g; s:(^|\\n)([^/,]*)([^\\n]*\\n\\2(,|/))*:\\n&:g; s:\\n+$:\\n:' | (echo remote,local; cat) | column -tdLs, -Na,b -Ob,a; }; track"
|
||||||
|
branches = track
|
||||||
[status]
|
[status]
|
||||||
submodulesummary = true
|
submodulesummary = true
|
||||||
[diff]
|
[diff]
|
||||||
|
|||||||
Reference in New Issue
Block a user