-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathgitconfig
84 lines (66 loc) · 1.75 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
[user]
name = Your Name
email = Your email
[alias]
# shortcuts
addp = add -p .
cop = checkout -p .
br = branch
bra = branch -av
co = checkout
ci = commit
di = diff
ds = diff --staged
re = reset
st = status
# info
log-file = log --follow --patch --
fame = shortlog --summary --numbered --all --
# assume-unchanged
assume = update-index --assume-unchanged
unassume = update-index --no-assume-unchanged
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
unassumeall = "!git assumed | xargs git update-index --no-assume-unchanged"
assumeall = "!git st -s | awk {'print $2'} | xargs git assume"
restore-file = !git checkout $(git rev-list -n 1 HEAD -- "$1")^ -- "$1"
# log
l = log --oneline --decorate --graph --branches --remotes -40
ll = log --oneline --decorate --graph --stat
ls = log --oneline --decorate --graph --branches --remotes --simplify-by-decoration -40
t = log --oneline --decorate --graph --branches --remotes -40 --pretty=format:'%C(yellow)%h%C(red bold)%d %Creset%s %C(green)(%ar) %C(cyan)<%cn>' --date=relative
# list aliases
al = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /'
# tag
lasttag = describe --tags --abbrev=0
# safety alias
pushf = push --force-with-lease
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = green
changed = yellow
untracked = red
[core]
excludesfile = ~/.gitignore_global
editor = vim
pager = less -r
[diff]
tool = vimdiff
compactionHeuristic = 1
[pull]
rebase = true
[push]
default = current
[rebase]
autostash = true
[credential]
helper = osxkeychain