Git: Improve defaults

This commit is contained in:
Robert Kmieć
2025-06-12 22:42:22 +02:00
parent 3e2ee388e6
commit 04bdd470fd

View File

@@ -1,5 +1,3 @@
[push]
default = simple
[user] [user]
name = Robert Kmieć name = Robert Kmieć
email = KmcR@viessmann.com email = KmcR@viessmann.com
@@ -7,38 +5,57 @@
editor = nvim editor = nvim
pager = delta pager = delta
autocrlf = false autocrlf = false
excludesfile = /home/rkmiec/.config/git/ignore excludesfile = ~/.config/git/ignore
symlinks = true symlinks = true
attributesfile = ~/.gitattributes attributesfile = ~/.gitattributes
fsmonitor = true fsmonitor = true
#attributesfile = ~/.gitattributes untrackedCache = true
[init]
defaultBranch = master
[advice]
detachedHead = false
[help] [help]
autocorrect = 1 autocorrect = 1
[color] [color]
ui = true ui = true
[column]
ui = auto
[grep] [grep]
linenumber = true linenumber = true
[sendemail] parrernType = perl
smtpencryption = tls [fetch]
smtpserver = smtp.gmail.com writeCommitGraph = true
smtpuser = robert.r.kmiec@gmail.com all = true
smtpserverport = 587 #pruneTags = true
[merge] [push]
conflictstyle = diff3 default = simple
tool = nfugitive autoSetupRemote = true
[mergetool "nfugitive"]
cmd = nvim -c "Gvdiffsplit!" "$MERGED"
[diff]
tool = nvimdiff
[difftool "nvimdiff"]
cmd = nvim -d "$LOCAL" "$REMOTE"
[diff "markdown"]
xfuncname = "^#+.*$"
[filter "lfs"] [filter "lfs"]
clean = git-lfs clean -- %f clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f smudge = git-lfs smudge -- %f
process = git-lfs filter-process process = git-lfs filter-process
required = true required = true
[pull]
rebase = true
[rebase]
autosquash = true
autostash = true
updateRefs = true
[commit]
template = .gitmessage
verbose = false
; [mergetool "vimdiff"]
; cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
[submodule]
recurse = false
fetchJobs = 4
[rerere]
enabled = true
autoupdate = true
[branch]
sort = committerdate
[tag]
sort = version:refname
[alias] [alias]
cm = commit cm = commit
co = checkout co = checkout
@@ -51,39 +68,48 @@
diff-image = "!f() { cd -- \"${GIT_PREFIX:-.}\"; GIT_DIFF_IMAGE_ENABLED=1 git diff \"$@\"; }; f" diff-image = "!f() { cd -- \"${GIT_PREFIX:-.}\"; GIT_DIFF_IMAGE_ENABLED=1 git diff \"$@\"; }; f"
[interactive] [interactive]
diffFilter = delta --color-only diffFilter = delta --color-only
[delta] [merge]
features = side-by-side line-numbers decorations conflictstyle = zdiff3
whitespace-error-style = 22 reverse tool = nfugitive
[delta "decorations"] [mergetool "nfugitive"]
commit-decoration-style = bold yellow box ul cmd = nvim -c "Gvdiffsplit!" "$MERGED"
file-style = bold yellow ul [diff]
file-decoration-style = none tool = nvimdiff
[pull] colorMoved = plain
rebase = true algorithm = histogram
[commit] renames = true
template = .gitmessage mnemonicPrefix = true
verbose = false [difftool "nvimdiff"]
[mergetool "vimdiff"] cmd = nvim -d "$LOCAL" "$REMOTE"
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
[init]
defaultBranch = master
[diff "image"] [diff "image"]
command = /home/kmcr/tools/git-diff-image/git_diff_image command = /home/kmcr/tools/git-diff-image/git_diff_image
textconv = imgcat textconv = imgcat
[diff "model"] [diff "model"]
command = /home/kmcr/tools/git-diff-image/git_diff_image command = /home/kmcr/tools/git-diff-image/git_diff_image
textconv = imgcat textconv = imgcat
[advice] [diff "markdown"]
detachedHead = false xfuncname = "^#+.*$"
[submodule] [delta]
recurse = false features = decorations
[rerere] navigate = true
enabled = true dark = true
[column] side-by-side = true
ui = auto line-numbers = true
[branch] hyperlinks = true
sort = -commiterdate whitespace-error-style = 22 reverse
[fetch] # colorMoved support
writeCommitGraph = true map-styles = bold purple => syntax magenta, bold cyan => syntax blue
true-color = always
[delta "decorations"]
commit-decoration-style = bold yellow box ul
file-style = bold yellow ul
file-decoration-style = none
[maintenance] [maintenance]
repo = /home/kmcr/repos/hems/hemsmilsimulation repo = /home/kmcr/repos/hems/hemsmilsimulation
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
smtpuser = robert.r.kmiec@gmail.com
smtpserverport = 587
[feature]
experimental = true