]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - gitconfig.m4
91e1f3d3e265d164b04e14bba6b64c74f72509b1
[config/dotfiles.git] / gitconfig.m4
1 # Global Git configuration file.
2
3 # Copyright (C) 2011-2012  Simon Ruderich
4 #
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.
9 #
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.
14 #
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/>.
17
18
19 dnl Load m4 macros.
20 include(../lib.m4)
21
22 [user]
23         name = Simon Ruderich
24         email = simon@ruderich.org
25
26 [color]
27         ui = auto
28
29 [core]
30         editor = vim
31         # Can't use ~/ because of older git versions.
32         excludesfile = GITIGNORE
33
34 # Use pager for the following commands.
35 [pager]
36         status = yes
37         tag = yes
38
39 [alias]
40         # Shortcuts for often used commands.
41         #
42         # Local.
43         c   = commit --verbose
44         ci  = commit --verbose
45         d   = diff --patience
46         di  = diff --patience
47         dw  = diff --patience --color-words
48         dc  = diff --patience --cached
49         dcw = diff --patience --cached --color-words
50         s   = status
51         st  = status
52         l   = log
53         ls  = log --stat
54         lp  = log --patch --patience
55         a   = add
56         ap  = add --patch
57         au  = add --update
58         # Branches.
59         co  = checkout
60         b   = branch --all --verbose
61         br  = branch --all --verbose
62         m   = merge
63         me  = merge
64         # Remote.
65         f   = fetch
66         fe  = fetch
67         t   = tag
68         p   = push
69         pu  = push
70         ru  = remote update
71         # Patches.
72         fp  = format-patch
73         # Misc.
74         fs  = fsck --strict --full
75         sl  = stash list
76         ss  = stash save
77         sa  = stash apply
78         ssk = stash save --keep-index
79
80         # Custom commands.
81         #
82         # tig-like log view.
83         glog = log --pretty=oneline --graph --all
84
85 [diff]
86         # Detect copies and renames.
87         renames = copy
88
89 # Allow diffing of some binary files.
90 # `pdftotext-` is a wrapper around pdftotext which writes to stdout.
91 # `sqlite3dump` is a wrapper calling `sqlite3 database-file .dump`.
92 [diff "gzip"]
93         textconv = gzip -d -c
94 [diff "pdf"]
95         textconv = pdftotext-
96 [diff "sqlite"]
97         textconv = sqlite3dump
98
99 [merge]
100 IF(OS, darwin)
101         tool = opendiff
102 FI
103 IF(OS, debian)
104         tool = vimdiff
105 FI
106
107 [format]
108         # When using git format-patch use threads and add all patches as
109         # replies to the first one.
110         thread = shallow
111
112 # vim: ft=gitconfig