dotfiles/.gitconfig

71 lines
2.1 KiB
INI

[user]
name = nojhan
email = nojhan@nojhan.net
[includeIf "gitdir:~/travail/**"]
path = ~/travail/.gitconfig
[credential]
helper = store
[commit]
# Adds -v to commit by default
verbose = true
[alias]
st = status
ci = commit -v
cb = checkout -b # create branch
ca = commit -v -a
co = checkout
lg = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
up = pull origin
di = diff
br = branch
sta = stash
[pager]
# use less as pager
# -R is necessary to display colors in less
# the '+' calls a command at start, that will jump to the first diff section
# then, you just have to type 'n' to iterate over diff sections
diff = less -R +'/^\\@\\@\\s'
[color]
ui = auto
[push]
default = simple
# push new tags along with commits being pushed
followtags = true
[pull]
rebase = true
[rebase]
instructionFormat = (%an <%ae>) %s
# You commit it with git commit --fixup OLD_COMMIT_ID,
# which gives the new commit the commit message fixup! add parsing code
# Now, when you run git rebase --autosquash main,
# it will automatically combine all the fixup! commits with their targets
autosquash = true
[diff "odf"]
textconv=odt2txt
[diff]
algorithm = histogram
# uses different colours to highlight lines in diffs that have been “moved”
colorMoved = default
[merge]
# Adds a middle section in 3-ways conflict sections.
conflictstyle = zdiff3
tool = meld
[init]
defaultBranch = main
[help]
# run the spelling suggestions automatically, you can set:
# - help.autocorrect to 1 (run after 0.1 seconds),
# - 10 (run after 1 second),
# - immediate (run immediately),
# - or prompt (run after prompting)
autocorrect = prompt
[core]
# Pager with syntax highlighting.
pager = delta
[status]
submoduleSummary = true
[branch]
# makes git branch sort by most recently used branches instead of alphabetical
sort = comitterdate
[log]
date = iso