From 838fb2f43e3fb8dea3ec9c368a95a0769cc87d90 Mon Sep 17 00:00:00 2001 From: js0ny Date: Mon, 27 Jan 2025 00:26:36 +0000 Subject: [PATCH 1/2] feat(git): Add more git configs --- common/gitconfig.example | 88 +++++++++++++++++++++++++++------------- 1 file changed, 60 insertions(+), 28 deletions(-) diff --git a/common/gitconfig.example b/common/gitconfig.example index 234d58a..734063f 100644 --- a/common/gitconfig.example +++ b/common/gitconfig.example @@ -1,28 +1,60 @@ -# $DOTFILES/common/gitconfig.example -# Date: 2024-12-22 -# Author: js0ny - -# Location: -# Windows: %USERPROFILE%\.gitconfig -# *nix: ~/.config/git/config -# Linking: (Note that this file is an example, only copy this then edit) -# cp $DOTFILES/common/gitconfig.example ~/.config/git/config -[user] # Modify the name and email - name = whoami - email = whoami@example.com -[core] - editor = nvim - pager = delta - autocrlf = input # Force End of Line in different platforms -[interactive] - diffFilter = delta --color-only -[delta] - navigate = true - dark = true -[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 -# insteadOf = https://github.com/ +# $DOTFILES/common/gitconfig.example +# Date: 2024-12-22 +# Author: js0ny + +# Location: +# Windows: %USERPROFILE%\.gitconfig +# *nix: ~/.config/git/config +# Linking: (Note that this file is an example, only copy this then edit) +# cp $DOTFILES/common/gitconfig.example ~/.config/git/config +[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 + 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 +# Force ssh +# [url "git@github.com:"] +# insteadOf = https://github.com/ +[url "git@codeberg.org:"] + insteadOf = https://codeberg.org/ \ No newline at end of file From 23eba5432c98dbf9988e13e54a9e518cbdfee7ef Mon Sep 17 00:00:00 2001 From: js0ny Date: Mon, 27 Jan 2025 00:33:07 +0000 Subject: [PATCH 2/2] Merged from upstream --- common/gitconfig.example | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/common/gitconfig.example b/common/gitconfig.example index 3c754dd..d13d62b 100644 --- a/common/gitconfig.example +++ b/common/gitconfig.example @@ -10,7 +10,6 @@ [user] # Modify the name and email name = whoami email = whoami@example.com -<<<<<<< HEAD [alias] cl = clone clnh = clone --depth 1 @@ -26,20 +25,18 @@ excludesfile = $XDG_CONFIG_HOME/git/ignore quotePath = false # zh-CN: 解决中文路径问题 eol = lf -======= [include] path = ~/.config/git/catppuccin-delta.gitconfig [core] editor = nvim pager = delta autocrlf = input # Force End of Line in different platforms ->>>>>>> github/master [interactive] diffFilter = delta --color-only [delta] navigate = true dark = true -<<<<<<< HEAD + features = catppuccin-mocha [diff] tool = nvimdiff [difftool] @@ -58,24 +55,13 @@ ff = only [init] defaultBranch = master -======= - features = catppuccin-mocha ->>>>>>> github/master [filter "lfs"] clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f process = git-lfs filter-process required = true -<<<<<<< HEAD # Force ssh # [url "git@github.com:"] # insteadOf = https://github.com/ [url "git@codeberg.org:"] insteadOf = https://codeberg.org/ -======= -[init] - defaultBranch = master - -# [url "git@github.com:"] # Force ssh -# insteadOf = https://github.com/ ->>>>>>> github/master