mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
feat(git): Add more git configs
This commit is contained in:
parent
61d3539d2a
commit
838fb2f43e
1 changed files with 60 additions and 28 deletions
|
|
@ -1,28 +1,60 @@
|
||||||
# $DOTFILES/common/gitconfig.example
|
# $DOTFILES/common/gitconfig.example
|
||||||
# Date: 2024-12-22
|
# Date: 2024-12-22
|
||||||
# Author: js0ny
|
# Author: js0ny
|
||||||
|
|
||||||
# Location:
|
# Location:
|
||||||
# Windows: %USERPROFILE%\.gitconfig
|
# Windows: %USERPROFILE%\.gitconfig
|
||||||
# *nix: ~/.config/git/config
|
# *nix: ~/.config/git/config
|
||||||
# Linking: (Note that this file is an example, only copy this then edit)
|
# Linking: (Note that this file is an example, only copy this then edit)
|
||||||
# cp $DOTFILES/common/gitconfig.example ~/.config/git/config
|
# cp $DOTFILES/common/gitconfig.example ~/.config/git/config
|
||||||
[user] # Modify the name and email
|
[user] # Modify the name and email
|
||||||
name = whoami
|
name = whoami
|
||||||
email = whoami@example.com
|
email = whoami@example.com
|
||||||
[core]
|
[alias]
|
||||||
editor = nvim
|
cl = clone
|
||||||
pager = delta
|
clnh = clone --depth 1
|
||||||
autocrlf = input # Force End of Line in different platforms
|
cma = commit -am
|
||||||
[interactive]
|
logs = log --oneline --graph --decorate --all
|
||||||
diffFilter = delta --color-only
|
last = log -1 HEAD
|
||||||
[delta]
|
undo = reset --hard HEAD
|
||||||
navigate = true
|
[core]
|
||||||
dark = true
|
editor = nvim
|
||||||
[filter "lfs"]
|
pager = delta
|
||||||
clean = git-lfs clean -- %f
|
autocrlf = input
|
||||||
smudge = git-lfs smudge -- %f
|
safecrlf = true
|
||||||
process = git-lfs filter-process
|
excludesfile = $XDG_CONFIG_HOME/git/ignore
|
||||||
required = true
|
quotePath = false # zh-CN: 解决中文路径问题
|
||||||
# [url "git@github.com:"] # Force ssh
|
eol = lf
|
||||||
# insteadOf = https://github.com/
|
[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
|
||||||
|
# Force ssh
|
||||||
|
# [url "git@github.com:"]
|
||||||
|
# insteadOf = https://github.com/
|
||||||
|
[url "git@codeberg.org:"]
|
||||||
|
insteadOf = https://codeberg.org/
|
||||||
Loading…
Add table
Add a link
Reference in a new issue