Skip to content

Instantly share code, notes, and snippets.

@jeandat
Last active April 7, 2019 11:17
Show Gist options
  • Save jeandat/c10f7e8b6bdb2bccf32d to your computer and use it in GitHub Desktop.
Save jeandat/c10f7e8b6bdb2bccf32d to your computer and use it in GitHub Desktop.
Global git configuration

Git Configuration

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment