install.fairie/dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl

160 lines
4 KiB
Cheetah
Raw Normal View History

[include]
path = ${XDG_DATA_HOME}/delta/themes.gitconfig
path = ${XDG_CONFIG_HOME}/git/local.toml
[advice]
detachedHead = false
[alias]
c = commit
ca = commit -a
cm = commit -m
cam = commit -am
d = diff
dc = diff --cached
l = log --graph --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit
master = !git add --all && git commit -am 'Quick commit.' -n && git push origin master
sub = submodule update --init --recursive
# Find commits by source code.
cc = "!f() { \
git log --pretty=custom --decorate --date=short -S\"$1\"; \
}; f"
# Find commits by commit message.
cm = "!f() { \
git log --pretty=custom --decorate --date=short --grep=\"$1\"; \
}; f"
# Credit an author on the latest commit.
credit = "!f() { \
if [ -n \"$1\" ] && [ -n \"$2\" ]; then \
git commit --amend --author \"$1 <$2>\" -C HEAD; \
fi \
}; f"
[branch]
autosetuprebase = always
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = true
pager = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[commit]
template = ${XDG_CONFIG_HOME}/git/commit-template
[core]
editor = vi
excludesfile = ${XDG_CONFIG_HOME}/git/ignore
autocrlf = input
attributesfile = ${XDG_CONFIG_HOME}/git/attributes
editor = code --wait
eol = lf
fileMode = false
pager = delta -w ${FZF_PREVIEW_COLUMNS:-$COLUMNS}
safecrlf = warn
whitespace = trailing-space,space-before-tab
[credential]
helper = cache --timeout=3600
[credential "https://github.com"]
helper = !gh auth git-credential
[credential "https://gist.github.com"]
helper = !gh auth git-credential
[delta]
decorations = true
features = side-by-side decorations hyperlinks interactive navigate unobtrusive-line-numbers woolly-mammoth zebra-dark
hyperlinks = true
interactive = true
map-styles = bold purple => syntax magenta, bold cyan => syntax blue
navigate = true
side-by-side = true
unobtrusive-line-numbers = true
plus-style = syntax "#003800"
minus-style = syntax "#3f0001"
[delta "interactive"]
keep-plus-minus-markers = false
[delta "decorations"]
commit-decoration-style = blue ol
commit-style = raw
file-style = omit
hunk-header-decoration-style = blue box
hunk-header-file-style = red
hunk-header-line-number-style = "#067a00"
hunk-header-style = file line-number syntax
[delta "line-numbers"]
line-numbers-left-style = cyan
line-numbers-right-style = cyan
line-numbers-minus-style = 124
line-numbers-plus-style = 28
[diff]
colorMoved = default
ignoresubmodules = dirty
renamelimit = 0
mnemonicprefix = true
renames = copies
[diff "bin"]
textconv = hexdump -v -C
[diff "image"]
command = compare $2 $1 png:- | montage -geometry +4+4 $2 - $1 png:- | display -title \"$1\" -
[difftool]
prompt = false
[fetch]
prune = true
[help]
autocorrect = 20
[init]
defaultBranch = master
templatedir = ~/.config/git/template
[interactive]
diffFilter = delta --color-only --features=interactive
[merge]
conflictstyle = diff3
ff = only
renamelimit = 0
summary = true
stat = true
tool = vscode
[mergetool "vscode"]
cmd = code --wait $MERGED
[pack]
threads = 0
[pretty]
custom = "%C(magenta)%h%C(red)%d %C(yellow)%ar %C(green)%s %C(yellow)(%an)"
[pull]
rebase = true
[push]
autoSetupRemote = true
default = upstream
followTags = true
[rebase]
autosquash = true
[rerere]
enabled = true
autoupdate = true
[sendemail]
smtpserver = smtp.gmail.com
smtpuser = {{ .user.gmailAddress }}
smtpencryption = tls
smtpserverport = 587
smtpPass = {{ .user.gmailAddressAppPassword }}
[status]
showUntrackedFiles = all
submoduleSummary = true
[transfer]
fsckobjects = true
[url "https://"]
insteadOf = git://
[user]
email = {{ .user.email }}
name = {{ .user.name }}
[web]
browser = google-chrome