Files
dotfiles/.config/git/config
druckdev 3297ba81b4 git:alias:track: Also list non-tracked remotes
The alias now lists all local *and* all remote branches and displays how
they are linked.
The `sort -uk1,1` deletes all duplicate entries of remote branches as
they could be listed as %(upstream) as well as %(refname) through the
`refs/remotes/`.
TODO:
     This deletes too many entries when multiple local branches track
     the same remote branch. (Why ever you should do that...)
     I guess this could be resolved by using `awk` for the uniqueness.
2021-11-12 15:56:01 +01:00

43 lines
1.2 KiB
Plaintext

[user]
email = druckdev@protonmail.com
name = druckdev
signingkey = C0A44F69F2E29F6586C86B96CA6B3A516FAC2555
[commit]
gpgsign = true
verbose = true
[difftool "meld"]
path = /usr/bin/meld
[color "status"]
added = 076
untracked = 014
[core]
pager = diff-so-fancy | less --tabs=8 -Rg -+FX -p'^(commit|added|deleted|modified|renamed|tag|(Submodule .* [a-f0-9]+[.]+[a-f0-9]+)|(stash@{[0-9]+}))[: ]'
excludesfile = ~/.config/git/ignore
[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)%(if)%(upstream)%(then),%(end)%(refname)' refs/heads refs/remotes | sort -uk1,1 -t, | sed -E 's/(.*),(.*)/\\2,\\1/; s:(heads/[^,]*)$:\\1,:; s:^refs/remotes/:,:; s:refs/[^/]*/::g' | column -ts,; }; track"
[status]
submodulesummary = true
[diff]
submodule = log
tool = nvimdiff
[rebase]
autostash = true
[include]
path = user.config
[pull]
rebase = true
ff = yes
[merge]
log = true
tool = nvimdiff
suppressDest = *
[init]
defaultBranch = main
[push]
default = current
[advice]
detachedHead = off
addIgnoredFile = off