-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
74 lines (74 loc) · 1.68 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
[user]
name = dmae3
email = [email protected]
[color]
status = auto
diff = auto
branch = auto
interactive = auto
grep = auto
[pull]
ff = only
[push]
default = tracking
[core]
excludesfile = ~/.gitignore
autocrlf = input
[alias]
st = status
sh = show
so = remote show origin
ft = fetch
up = pull --rebase
rbm = rebase master
ad = add
ci = commit
cam = commit --amend # fix a last commit
co = checkout
# branch
br = branch
brr = branch -r
ba = branch -a
bm = branch --merged
bn = branch --no-merged
# log
wc = whatchanged
ls = log --stat
lp = log -p
ln = log --name-status
la = log --pretty=\"format:%ad %h (%an): %s\" --date=short
lr = log origin
oneline = log --pretty=oneline
ranking = shortlog -s -n --no-merges
log-graph = log --graph --date=short --pretty=format:'%Cgreen%h %cd %Cblue%cn %Creset%s'
log-all = log --graph --all --color --pretty='%x09%h %cn%x09%s %Cred%d%Creset'
# diff
di = diff
dm = diff master
dw = diff --color-words
dc = diff --cached
ds = diff --staged
d1 = diff HEAD~
d2 = diff HEAD~~
d3 = diff HEAD~~~
d4 = diff HEAD~~~~
d5 = diff HEAD~~~~~
d10 = diff HEAD~~~~~~~~~~
# edit a conficting file
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; vim `f`"
# add a conficting file
add-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`"
# grep
gr = grep
gn = grep -n
[credential]
helper = osxkeychain
[url "https://github.com"]
insteadOf = git://github.com
[filter "lfs"]
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
[ghq]
root = ~/.ghq