Skip to content

Instantly share code, notes, and snippets.

@fidergo-stephane-gourichon
Created November 23, 2018 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fidergo-stephane-gourichon/1f1e84d30114b3b25fe74d2ad8efcb1e to your computer and use it in GitHub Desktop.
Save fidergo-stephane-gourichon/1f1e84d30114b3b25fe74d2ad8efcb1e to your computer and use it in GitHub Desktop.
A sample .gitconfig file.
[core]
editor = edite
[user]
name = FIXME put your name here, to be included into each commit
email = FIXME put your e-mail address here, to be included into each commit
[color]
ui = auto
[alias]
st = status
[merge]
# http://sip-router.org/wiki/git/quick-start-guide
log = true
[push]
default = simple
recurseSubmodules = check
[guitool "'Git add' other-than-just-whitespace changes."]
cmd = git diff -w --no-color \"$FILENAME\" | git apply --cached --ignore-whitespace
needsfile = yes
[guitool "Edit in preferred editor"]
cmd = editor \"$FILENAME\"
noconsole = yes
needsfile = yes
[alias]
ediff = difftool -t ediff
[difftool "ediff"]
cmd = diff-emacs-files.sh \"$LOCAL\" \"$REMOTE\"
[gui]
diffcontext = 1
fontdiff = -family \"Envy Code R\" -size 8 -weight normal -slant roman -underline 0 -overstrike 0
fontui = -family \"DejaVu Sans\" -size 8 -weight normal -slant roman -underline 0 -overstrike 0
# for $deity's sake, check that anything we're getting is complete and sane on a regular basis
[transfer]
fsckobjects = true
[fetch]
fsckobjects = true
[receive]
fsckObjects = true
# [git - propagating repo corruption across clone](http://git.661346.n2.nabble.com/propagating-repo-corruption-across-clone-td7580504.html)
# [#743227 - "git -c transfer.fsckobjects=true clone https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware" fails - Debian Bug report logs](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=743227)
[alias]
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
[log]
date = iso
[alias]
# This graphviz DOT generator is very hackish and won't work always.
graphviz = "!f() { echo 'digraph git { node[shape=rectangle]' ; git log --pretty='format: %h -> { %p }; %h [ label=\"%h\\n%ci\n%d\" ] ; ' \"$@\" | sed -e 's/ \\([0-9a-f][0-9a-f][0-9a-f][0-9a-f]*\\)/ \"\\1\"/g' -e 's/, /\\\\n/g' ; echo '}'; }; f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment