I put this configuration on every machine I work on in ~/.gitconfig
.
It set the global scope ; equivalent to git config --global <key> <value>
.
[user]
name = jeandat
email = [email protected]
[diff]
tool = vscode
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
[merge]
tool = vscode
[mergetool "vscode"]
cmd = code --wait $MERGED
[color]
ui = true
[alias]
ls = log --decorate --abbrev-commit --date=relative --color --graph --all --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]"
st = status
br = branch
ch = checkout
# Attention, --color-words se trompe parfois sévèrement
# de plus, comme il se base sur les séparateurs de mots, les markup languages ne lui parlent pas
# [\\s:,.<>]+
wdiff = diff --color-words --ignore-all-space
[core]
# More info here : http://git-scm.com/book/fr/Personnalisation-de-Git-Configuration-de-Git (section core.autocrlf)
# Use "input" on MacOSX as most repo use LF only on server
editor = code --wait
[pull]
rebase = preserve