-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
107 lines (96 loc) · 3.6 KB
/
.gitconfig
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
[user]
name = Andy White
email = greatwhitehope@gmail.com
#[core]
#excludesfile = /Users/awhite/.gitignore_global
[push]
default = simple
[color]
ui = true
[alias]
# common command shortcuts
s = status
a = add
b = !git --no-pager branch
ba = !git --no-pager branch --all
bm = !git --no-pager branch --merged
bam = !git --no-pager branch --all --merged
bnm = !git --no-pager branch --no-merged
bd = branch -d
co = checkout
com = checkout master
ci = commit
d = diff
dt = difftool
dthx = !git diff --name-only | grep '\\.hx$' | xargs git dt
dtnobin = !git diff --name-only | grep -v '^bin\\/' | xargs git dt
dtnowww = !git diff --name-only | grep -v '^www\\/' | xargs git dt
dtnojs = !git diff --name-only | grep -v '\\.js$' | xargs git dt
dtnojscss = !git diff --name-only | grep -v '\\.js$' | grep -v '\\.css$' | xargs git dt
dtnohtml = !git diff --name-only | grep -v '\\.html$' | xargs git dt
dtjs = !git diff --name-only | grep '\\.js$' | xargs git dt
m = merge
mt = mergetool
sm = submodule
fa = fetch --prune --all
fo = fetch --prune origin
fu = fetch --prune upstream
mom = merge origin/master
mum = merge upstream/master
pushot = !git push -u origin $(git rev-parse --abbrev-ref HEAD)
pushut = !git push -u upstream $(git rev-parse --abbrev-ref HEAD)
pusho = !git push origin
pushu = !git push upstream
pushou = !git push origin && git push upstream
pushoutags = !git push origin --follow-tags && git push upstream --follow-tags
pp = !git pull && git push origin
alias = !git config --list | grep alias | sort | sed 's/^alias\\.//'
pr = !git pushot && hub pull-request
sync = !git pull && git push origin
# show "current commit" hash
cc = rev-parse HEAD
ccs = rev-parse --short HEAD
# history - log graphs with color and other decorations
#hist = log --pretty=format:'%H %d | %ad | %an - %s' --graph --date=short
#h = log --pretty=format:'%H %d | %ad | %an - %s' --graph --date=short --all
#h = log --oneline --decorate --graph --all
#hb = log --oneline --decorate --graph
h = log --graph --pretty=format:'%C(auto)%h%d %s %C(bold blue)%an %Cgreen%cr%Creset' --all
hb = log --graph --pretty=format:'%C(auto)%h%d %s %C(bold blue)%an %Cgreen%cr%Creset'
# diff/list/log files that are different in HEAD compared to master
# or files that are different in master compared to HEAD
dtom = diff --name-status master...HEAD
dfromm = diff --name-status HEAD...master
dttom = difftool master...HEAD
dtfromm = difftool HEAD...master
ltom = log --oneline --decorate --graph master..HEAD
lfromm = log --oneline --decorate --graph HEAD..master
lm = log --oneline --decorate --graph --left-right master...HEAD
# low-level utilities
type = cat-file -t
dump = cat-file -p
[diff]
tool = kdiff3
guitool = kdiff3
[difftool]
prompt = false
[difftool "kdiff3"]
trustExitCode = false
[merge]
tool = kdiff3
[mergetool]
prompt = false
[mergetool "kdiff3"]
trustExitCode = false
#[diff]
# tool = p4difftool
#[difftool "p4difftool"]
# cmd = p4merge $LOCAL $REMOTE
#
#[merge]
# tool = p4mergetool
#[mergetool]
# keepBackup = false
#[mergetool "p4mergetool"]
# cmd = p4merge $PWD/$BASE $PWD/$REMOTE $PWD/$LOCAL $PWD/$MERGED
# trustExitCode = false