-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgitconfig
More file actions
175 lines (165 loc) · 5.81 KB
/
Copy pathgitconfig
File metadata and controls
175 lines (165 loc) · 5.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
[user]
name = William Hubault
email = contact@williamhubault.com
# --- (generic settings) ---
[core]
excludesfile = ~/.gitignore-global
attributesfile = ~/.gitattributes-global
whitespace = trailing-space,space-before-tab
editor = vim
#pager =
#[pager]
#color = false
#show = vim -R -
autocrlf = input
pager = diff-so-fancy | less --tabs=4 -RFX
[apply]
whitespace = fix
[advice]
statusHints = false
[status]
short = false
branch = true
[push]
default = simple
[diff]
tool = meld
algorithm = histogram
[difftool]
prompt = false
[fetch]
prune = true
[rebase]
autosquash = false
[rerere]
enabled = true
[grep]
lineNUmber = true
extendRegexp = true
extendedRegexp = true
[hub]
protocol = https
[github]
user = wellspring
# --- (style) ---
[color]
ui = auto
[color "status"]
header = 240
branch = 0 240
added = green
changed = red
untracked = 235
nobranch = yellow
[color "diff"]
meta = 242
frag = 27
old = red bold
new = green bold
whitespace = green reverse
[color "diff-highlight"]
oldNormal = red bold
newNormal = green bold
oldHighlight = red bold 52
newHighlight = green bold 22
[color "branch"]
current = bold blue
local = green
remote = yellow
# --- (repositories) ---
[url "gitlab@privategit:william/"]
insteadOf = "p:"
insteadOf = "private:"
insteadOf = "william:"
pushInsteadOf = "william:"
pushInsteadOf = "private:"
pushInsteadOf = "p:"
[url "https://github.com/wellspring/"]
insteadOf = "my:"
insteadOf = "mygithub:"
insteadOf = "wellspring:"
[url "git@github.com:wellspring/"]
pushInsteadOf = "https://www.github.com/wellspring/"
pushInsteadOf = "http://www.github.com/wellspring/"
pushInsteadOf = "git://www.github.com/wellspring/"
pushInsteadOf = "https://github.com/wellspring/"
pushInsteadOf = "http://github.com/wellspring/"
pushInsteadOf = "git://github.com/wellspring/"
pushInsteadOf = "wellspring:"
pushInsteadOf = "mygithub:"
pushInsteadOf = "my:"
[url "https://github.com/"]
insteadOf = "g:"
insteadOf = "gh:"
insteadOf = "github:"
[url "git@github.com:"]
pushInsteadOf = "g:"
pushInsteadOf = "gh:"
pushInsteadOf = "github:"
pushInsteadOf = "https://www.github.com/"
pushInsteadOf = "http://www.github.com/"
pushInsteadOf = "git://www.github.com/"
pushInsteadOf = "ssh://www.github.com/"
pushInsteadOf = "https://github.com/"
pushInsteadOf = "http://github.com/"
pushInsteadOf = "git://github.com/"
pushInsteadOf = "ssh://github.com/"
[url "https://bitbucket.org/"]
insteadOf = "bb:"
insteadOf = "bitbucket:"
[url "git@bitbucket.org:"]
pushInsteadOf = "bb:"
pushInsteadOf = "bitbucket:"
pushInsteadOf = "https://www.bitbucket.org/"
pushInsteadOf = "http://www.bitbucket.org/"
pushInsteadOf = "git://www.bitbucket.org/"
pushInsteadOf = "ssh://www.bitbucket.org/"
pushInsteadOf = "https://bitbucket.org/"
pushInsteadOf = "http://bitbucket.org/"
pushInsteadOf = "git://bitbucket.org/"
pushInsteadOf = "ssh://bitbucket.org/"
[url "git@gist.github.com:"]
insteadOf = "gist:"
pushInsteadOf = "https://gist.github.com/"
pushInsteadOf = "http://gist.github.com/"
pushInsteadOf = "git://gist.github.com/"
pushInsteadOf = "ssh://gist.github.com/"
[url "git@heroku.com:"]
insteadOf = "heroku:"
insteadOf = "h:"
# --- (shortcuts) ---
[alias]
st = status
ci = commit
co = checkout
br = branch
ds = diff --staged
patch = --no-pager diff --no-color
ready = diff --staged
wdiff = diff --word-diff
rdiff = "!bash -c 'regex=$1;shift; git diff -U0 -G $regex $* | sed -n \"/^\\([^-+]\\|[-+].*$regex.*\\)/p\" | awk \"/^@@/{p=\\$0} !/^@@/{if(p!=\\\"\\\"){print p;p=\\\"\\\"};print \\$0}\" | diff-so-fancy' -" # `git diff` that filters by regex (usage: git rdiff <regex> [files [...]])
radd = "!bash -c 'regex=$1;shift; git diff -U0 -G $regex $* | sed -n \"/^\\([^-+]\\|[-+].*$regex.*\\)/p\" | awk \"/^@@/{p=\\$0} !/^@@/{if(p!=\\\"\\\"){print p;p=\\\"\\\"};print \\$0}\" | git apply --cached --unidiff-zero -' -" # `git add` that selectively filters by regex (usage: git rdiff <regex> [files [...]])
branches = branch --verbose -a
remotes = remote --verbose show
graph = log --graph --pretty=format':%C(blue bold)%h%Cblue%d%Creset %s -- %C(reset)(%C(green bold)%an%Creset, %C(green)%ar%Creset)'
standup = log --since '1 day ago' --oneline --author william.hubault@gmail.com
trlog = !git --no-pager log -n10 --pretty=format:'- %C(198)%s %C(234)(%C(238)%ar [%h]%C(234))%C(reset)'
rlog = log --pretty=format:'%C(green)%ar%Creset, by %C(red bold)%an %Creset-> %C(cyan)%s'
slog = log --pretty=format:'%Creset%C(red bold)[%ad] %C(blue bold)%h %Creset%C(magenta bold)%d %Creset%s %C(green bold)(%an)%Creset' --abbrev-commit --date=short
pull-submodules = submodule foreach git pull origin master
g = grep --break --heading --line-number
ec = config --global -e
up = !git pull --rebase --prune $@ && git submodule update --init --recursive
cob = checkout -b
cm = !git add -A && git commit -m
save = !git add -A && git commit -m "SAVEPOINT"
wip = !git add -u && git commit -m "WIP"
unadd = reset
undo = reset HEAD~1 --mixed
amend = commit -a --amend
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard
bclean = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs -r git branch -d; }; f"
bdone = "!f() { git checkout ${1-master} && git up && git bclean ${1-master}; }; f"
staged = diff --name-only --cached
modified = diff --name-only
untracked = !git status --porcelain | grep "^?? " | sed -e 's/^[?]* //'