forked from drmohundro/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig.erb
executable file
·91 lines (76 loc) · 2.2 KB
/
gitconfig.erb
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
[color]
ui = always
[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"]
added = green
changed = yellow
untracked = cyan
[branch]
autosetuprebase = always
<% if RUBY_PLATFORM =~ /(win32|mingw32)/ %>
[diff]
tool = bc
[difftool]
prompt = false
[difftool "bc"]
path = c:/Program Files (x86)/Beyond Compare 4/bcomp.exe
[merge]
tool = bc
[mergetool]
keepBackup = false
[mergetool "bc"]
path = c:/Program Files (x86)/Beyond Compare 4/bcomp.exe
<% end %>
[pager]
diff = diff-so-fancy | less --tabs=1,5 -RFX
show = diff-so-fancy | less --tabs=1,5 -RFX
[help]
autocorrect = 1
[push]
default = upstream
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff --word-diff
dc = diff --cached --word-diff
vdf = difftool --dir-diff
vdfc = difftool --dir-diff --cached
# Show files ignored by git:
ign = ls-files -o -i --exclude-standard
# Pretty logs
lg1 = log --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(cyan)- %an%C(reset)%C(bold yellow)%d%C(reset)' --graph --abbrev-commit --decorate --date=relative --all
lg2 = log --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(cyan)- %an%C(reset)' --graph --abbrev-commit --decorate --all
lg = !"git lg1"
ll = log --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(cyan)- %an%C(reset)%C(bold yellow)%d%C(reset)' --decorate --numstat
fld = log --word-diff -u
# Diff a rev
diffr = "!f() { git diff "$1"^.."$1" --word-diff; }; f"
diffrt = "!f() { git difftool "$1"^.."$1" --word-diff; }; f"
# List aliases
la = "!git config -l | grep alias | cut -c 7-"
# improved grep display
g = grep --break --heading --line-number
[grep]
extendRegexp = true
lineNumber = true
<% if RUBY_PLATFORM =~ /darwin/ %>
[credential]
helper = osxkeychain
<% end %>