1 # Global Git configuration file.
3 # Copyright (C) 2011-2013 Simon Ruderich
5 # This file is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # This file is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this file. If not, see <http://www.gnu.org/licenses/>.
24 email = simon@ruderich.org
34 # Function in hunk header.
35 function = magenta bold
45 # Can't use ~/ because of older git versions.
46 excludesfile = GITIGNORE
48 # Use pager for the following commands.
54 # Don't require <Return> in interactive commands which require only a
55 # single key, for example `git add --patch`.
59 ## Shortcuts for often used commands.
66 dw = diff PATIENCE --color-words
67 dc = diff PATIENCE --cached
68 dcw = diff PATIENCE --cached --color-words
73 lp = log --patch PATIENCE
83 mo = merge origin/master
90 # Parallel git remote update. Also strips unnecessary output.
92 | xargs -d '\\n' -n1 -P0 git remote update 2>&1 \
94 /^Please make sure you have the correct access rights$/d; \
95 /^and the repository exists\\.$/d;'"
96 # Push to all remotes. Thanks to albel727 in #git on Freenode
97 # (2011-06-04 16:06 CEST) for the idea. Modified to push in parallel
98 # and to strip unnecessary output.
100 | xargs -d '\\n' -n1 -P0 git push 2>&1 \
102 /^Please make sure you have the correct access rights$/d; \
103 /^and the repository exists\\.$/d;'"
107 # (Redirection of stderr is necessary to prevent missing output with
108 # my "color stderr" solution in Zsh.)
109 fs = ! git fsck --strict --full 2>&1
110 fg = ! git fs && git gc --aggressive 2>&1 # fsck and compress repo
114 ssk = stash save --keep-index
120 # tig-like log view. Similar to the following but with author/date
121 # information. --pretty=format is not used because it doesn't allow
122 # precise enough control over formats and colors.
124 # tig = log --pretty=oneline --graph --all --decorate --abbrev-commit
128 # Detect copies and renames.
131 # Change the definition of a word as used by diff --color-words to be
132 # shorter (not only spaces) and thus simplify the generated diffs.
133 # Words ([a-zA-Z0-9_]+) are matched, or a single non-word character
134 # ([^a-zA-Z0-9_]), therefore changes to words are shown in complete
135 # (e.g. from "word" to "newword" as "[-word-]{+newword+}"), but
136 # changes to non-word characters are shown character wise (e.g. from
137 # "==" to "!=" as "[-=-]{+!+}="); [-..-] is removal, {+..+} is
138 # addition. See t/ for some tests and examples.
139 wordregex = [a-zA-Z0-9_]+|[^a-zA-Z0-9_]
141 # Allow diffing of some binary files.
143 # `pdftotext-` is a wrapper around pdftotext which writes to stdout.
144 # `sqlite3dump` is a wrapper calling `sqlite3 database-file .dump`.
146 textconv = gzip -d -c
148 textconv = pdftotext-
150 textconv = sqlite3dump
161 # When using git format-patch use threads and add all patches as
162 # replies to the first one.
166 # Automatically fsck objects when receiving them (respected by git
167 # receive-pack and git fetch (>= 1.7.8, for fetch)).
170 # vim: ft=gitconfig noet