feat(git): Add more git configs

This commit is contained in:
js0ny 2025-01-27 00:26:36 +00:00
parent 61d3539d2a
commit 838fb2f43e

View file

@ -10,19 +10,51 @@
[user] # Modify the name and email
name = whoami
email = whoami@example.com
[alias]
cl = clone
clnh = clone --depth 1
cma = commit -am
logs = log --oneline --graph --decorate --all
last = log -1 HEAD
undo = reset --hard HEAD
[core]
editor = nvim
pager = delta
autocrlf = input # Force End of Line in different platforms
autocrlf = input
safecrlf = true
excludesfile = $XDG_CONFIG_HOME/git/ignore
quotePath = false # zh-CN: 解决中文路径问题
eol = lf
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true
dark = true
[diff]
tool = nvimdiff
[difftool]
prompt = false
[difftool "nvimdiff"]
cmd = "nvim -d \"$LOCAL\" \"$REMOTE\""
[merge]
tool = nvimdiff
[mergetool]
prompt = false
[mergetool "nvimdiff"]
cmd = "nvim -d \"$LOCAL\" \"$MERGED\" \"$REMOTE\""
[color]
ui = auto
[pull]
ff = only
[init]
defaultBranch = master
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
# [url "git@github.com:"] # Force ssh
# Force ssh
# [url "git@github.com:"]
# insteadOf = https://github.com/
[url "git@codeberg.org:"]
insteadOf = https://codeberg.org/