-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
121 lines (102 loc) · 2.53 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
[http]
sslVerify = false
[alias]
aa = add --all
ap = add --patch
branches = !legit branches
c = commit -am
ci = commit -am
co = checkout
# Show the diff between the latest commit and the current state
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
last = diff HEAD^ # diff last committed change
st = status
df = diff --color --color-words --abbrev
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
uncommit = reset --soft HEAD^ # go back before last commit, with files in uncommitted state
unstage = reset HEAD # remove files from index (tracking)
graft = !legit graft
harvest = !legit harvest
publish = !legit publish
unpublish = !legit unpublish
sprout = !legit sprout
sync = !legit sync
switch = !legit switch
resync = !legit resync
[init]
templatedir = ~/.git_template
[core]
excludesfile = ~/.gitignore
autocrlf = input
editor = vim
[pager]
# insanely beautiful diffs ==> npm install -g diff-so-fancy
diff = diff-so-fancy | less --tabs=4 -RFX
show = diff-so-fancy | less --tabs=4 -RFX
[push]
default = current
[fetch]
prune = true
[rebase]
autosquash = true
[apply]
whitespace = nowarn
[branch]
autosetupmerge = true
[advice]
statusHints = false
[diff]
algorithm = patience
mnemonicprefix = true
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
[filter "media"]
clean = git-media-clean %f
smudge = git-media-smudge %f
# so much color
[color]
ui = auto
[color "branch"]
current = bold white green
local = bold yellow
remote = bold magenta
upstream = bold cyan
[color "diff"]
meta = yellow bold
commit = green bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = "red bold 52"
newNormal = "green bold"
newHighlight = "green bold 22"
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "status"]
# staged changes
added = bold green
updated = bold green
# un-staged changes
changed = bold yellow
untracked = bold cyan
nobranch = bold red white
# git mergetool
[merge]
tool = vimdiff
summary = true
verbosity = 1
[mergetool]
prompt = false
keepbackup=false
[mergetool "vimdiff"]
cmd="vim -c 'Gdiff' $MERGED" # use fugitive.vim for 3-way merge
[include]
path = /home/vagrant/.gitconfig.local
# vim:ft=gitconfig