]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - gitconfig.m4
gitconfig: Group aliases.
[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         dc = diff --patience --cached
48         s  = status
49         st = status
50         l  = log
51         ls = log --stat
52         lp = log --patch --patience
53         a  = add
54         ap = add --patch
55         au = add --update
56         # Branches.
57         co = checkout
58         b  = branch --all --verbose
59         br = branch --all --verbose
60         m  = merge
61         me = merge
62         # Remote.
63         f  = fetch
64         fe = fetch
65         t  = tag
66         p  = push
67         pu = push
68         ru = remote update
69         # Patches.
70         fp = format-patch
71         # Misc.
72         fs = fsck --strict --full
73         ss = stash save
74         ssk = stash save --keep-index
75         sa = stash apply
76         sl = stash list
77
78         # Custom commands.
79         #
80         # tig-like log view.
81         glog = log --pretty=oneline --graph --all
82
83 [diff]
84         # Detect copies and renames.
85         renames = copy
86
87 # Allow diffing of some binary files.
88 # `pdftotext-` is a wrapper around pdftotext which writes to stdout.
89 # `sqlite3dump` is a wrapper calling `sqlite3 database-file .dump`.
90 [diff "gzip"]
91         textconv = gzip -d -c
92 [diff "pdf"]
93         textconv = pdftotext-
94 [diff "sqlite"]
95         textconv = sqlite3dump
96
97 [merge]
98 IF(OS, darwin)
99         tool = opendiff
100 FI
101 IF(OS, debian)
102         tool = vimdiff
103 FI
104
105 [format]
106         # When using git format-patch use threads and add all patches as
107         # replies to the first one.
108         thread = shallow
109
110 # vim: ft=gitconfig