]> git.phdru.name Git - dotfiles.git/blob - .gitconfig
.gitconfig: change alias 'ci' back to 'commit'
[dotfiles.git] / .gitconfig
1 [alias]
2 # I copied some aliases from http://gitalias.com/ and other sources.
3 # Some I've added to gitalias. Some are mine.
4
5   # One letter alias for our most frequent commands.
6   a = add
7   b = branch
8   c = commit
9   d = diff
10   f = fetch
11   g = grep
12   l = log
13   m = merge
14   o = checkout
15   p = pull
16   r = remote
17   s = status
18   w = whatchanged
19
20   ### add ###
21
22   aa = add --all
23
24   ap = add --patch
25
26   au = add --update
27
28   ### branch ###
29
30   be = branch --edit-description
31
32   bm = branch --merged
33
34   bnm = branch --no-merged
35
36   ### commit ###
37
38   cm = commit --message
39
40   ### checkout ###
41
42   co = checkout
43
44   ### cherry-pick ###
45
46   chp = cherry-pick
47
48   ### diff ###
49
50   # diff - show changes not yet staged
51   dc = diff --cached
52
53   # diff - changes about to be commited
54   ds = diff --staged
55
56   # diff - show changes but by word, not line
57   dw = diff --word-diff
58
59   ### rebase ###
60
61   rb = rebase
62
63   rba = rebase --abort
64
65   rbc = rebase --continue
66
67   rbs = rebase --skip
68
69   ### remote ###
70
71   rs = remote show
72
73   ru = remote update
74
75   rp = remote prune
76
77   incoming = !git remote update --prune; git log ..@{upstream}
78   outgoing = log @{upstream}..
79
80   # Push to all remotes
81   push-to-all-remotes = !git remote | xargs -I% -n1 git push %
82
83   ### show-branch ###
84
85   # show-branch - print a list of branches and their commits.
86   sb = show-branch
87
88   ### status ###
89
90   ss = status --short
91
92   ssb = status --short --branch
93
94   aliases = !"git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /'"
95
96   add-alias = "!f() { [ $# = 3 ] && git config $1 alias.\"$2\" \"$3\" && return 0 || echo \"Usage: git add-(local|global)-alias <new alias> <original command>\" >&2 && return 1; }; f"
97   add-global-alias = "!git add-alias --global"
98   add-local-alias = "!git add-alias --local"
99
100   tags = tag -n1 --list
101
102   # Find text in any commit ever
103   grep-all = !"f() { git rev-list --all | xargs git grep \"$@\"; }; f"
104
105   # Editing and adding conflicted files: when we get many merge conflicts
106   # and want to quickly solve them using an editor, then add the  files.
107   edit-unmerged = !"f() { git ls-files --unmerged | cut -f2 | sort -u ; }; $EDITOR `f`"
108   add-unmerged = !"f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`"
109
110   # Get the current branch name
111   branch-name = rev-parse --abbrev-ref HEAD
112
113         branches = branch --all
114         ca = commit --all
115         cv = commit --verbose
116         cav = commit --all --verbose
117         cane = commit --amend --no-edit
118         checkin = commit
119         ci = commit
120         cat = cat-file -p
121         dump = cat-file -p
122         file = cat-file -t
123         type = cat-file -t
124         l1 = log --decorate --oneline
125         l5 = log --decorate -5
126         ld = log --decorate
127         lg = log --decorate --graph
128         lg1 = log --decorate --graph --oneline
129         lg5 = log --decorate --graph -5
130         lr = log --decorate --reverse
131         lr1 = log --decorate --reverse --oneline
132         lr5 = log --decorate --reverse -5
133         null-merge = merge --strategy=ours
134         rbi123 = "!f() { git rebase --interactive $1 $2 ${3:-\"@{upstream\\}\"}; }; f"
135         rbi = !git rbi123 '' ''
136         rbia = !git rbi123 --autosquash ''
137         rbiap = !git rbi123 --autosquash --preserve-merges
138         rbip = !git rbi123 '' --preserve-merges
139         remotes = remote --verbose
140         #root = !pwd
141         root = rev-parse --show-toplevel
142         st = status --short
143         stb = status --short --branch
144         sd = show --decorate
145         sw = show --word-diff --decorate
146         unstage = reset HEAD --
147
148 [branch]
149         autosetuprebase = always
150
151 [color]
152         ui = auto
153
154 [include]
155         path = ~/lib/config/git/light_bg
156
157 [log]
158         abbrevCommit = true
159
160 [merge]
161         tool = vimdiff
162
163 #[mergetool "vimdiff3"]
164 # Don't forget to add -f for gvim
165 # 3 way diffs
166 #       cmd = vim -d \"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\" -c \"wincmd J\"
167
168 [push]
169         default = simple
170
171 [receive]
172         denyNonFastForwards = true
173
174 [web]
175         browser = webbrowser
176
177 [browser "webbrowser"]
178         cmd = webbrowser -n
179
180 [gui]
181         fontui = -family \"DejaVu Sans\" -size 18 -weight normal -slant roman -underline 0 -overstrike 0
182         fontdiff = -family \"DejaVu Sans Mono\" -size 18 -weight normal -slant roman -underline 0 -overstrike 0