Update gitconfig based on Julia Evans' article

https://jvns.ca/blog/2024/02/16/popular-git-config-options/
This commit is contained in:
Sami Samhuri 2024-03-18 09:46:52 -07:00
parent 23defc7be2
commit debd6fae66
No known key found for this signature in database

View file

@ -1,7 +1,7 @@
[user] [user]
name = Sami Samhuri name = Sami Samhuri
email = sami@samhuri.net email = sami@samhuri.net
signingkey = 2742FC16 signingKey = ~/.ssh/id_ed25519
[branch] [branch]
autosetupmerge = simple autosetupmerge = simple
autosetuprebase = always autosetuprebase = always
@ -11,12 +11,20 @@
excludesfile = /Users/sjs/config/gitignore excludesfile = /Users/sjs/config/gitignore
pager = diff-so-fancy | less --tabs=4 -RFX pager = diff-so-fancy | less --tabs=4 -RFX
attributesfile = /Users/work/.gitattributes attributesfile = /Users/work/.gitattributes
[fetch]
fsckobjects = true
prune = true
[pull] [pull]
ff = only ff = only
rebase = true rebase = true
[receive]
fsckobjects = true
[push]
autosetupremote = true
[commit] [commit]
verbose = true verbose = true
[diff] [diff]
algorithm = histogram
mnemonicprefix = true mnemonicprefix = true
renames = copies renames = copies
compactionHeuristic = true compactionHeuristic = true
@ -28,13 +36,18 @@
[color] [color]
ui = auto ui = auto
[merge] [merge]
conflictstyle = zdiff3
stat = true stat = true
[rebase] [rebase]
autosquash = true autosquash = true
autostash = true
updateRefs = true
[difftool] [difftool]
prompt = false prompt = false
[difftool "FileMerge"] [difftool "FileMerge"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\" cmd = opendiff \"$LOCAL\" \"$REMOTE\"
[interactive]
diffFilter = diff-so-fancy --patch
[credential] [credential]
helper = osxkeychain helper = osxkeychain
[grep] [grep]
@ -50,7 +63,7 @@
[init] [init]
defaultBranch = main defaultBranch = main
[gpg] [gpg]
program = /usr/local/bin/gpg format = ssh
[commit] [commit]
gpgsign = true gpgsign = true
[diff "swift"] [diff "swift"]