-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitconfig
61 lines (61 loc) · 1.42 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
[core]
quotepath = false
editor = "vim"
[log]
decorate = true
abbrevCommit = true
date = relative
[color]
branch = auto
decorate = auto
diff = auto
status = auto
showbranch = atuo
ui = auto
[commit]
verbose = true
[format]
pretty = %C(magenta)%h%Creset -%C(bold red)%d%Creset %s %C(green)(%ci) %C(cyan)<%an>%Creset
[merge]
conflictstyle = diff3
tool = nvimdiff
[mergetool]
prompt = true
[mergetool "nvimdiff"]
cmd = "nvim -d \"$LOCAL\" \"$REMOTE\" \"$MERGED\" -c 'wincmd w' -c 'wincmd J'"
[alias]
a = add
conf = config
c = commit --verbose
ca = commit --amend --verbose
cm = commit -m
cam = commit --amend -m
s = status
co = checkout
cob = checkout -b
lg = log --decorate --graph --all --oneline
d = diff
ds = diff --stat
dc = diff --cached
pu = push
puu = push -u
pud = push -d
pl = pull
br = branch
bra = branch -a
brl = branch -l
brr = branch -r
# list branches sorted by last modified
bt = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'"
# list aliases
la = "!git config -l | grep alias | cut -c 7-"
[init]
defaultBranch = master
[diff]
algorithm = histogram
suppressBlankEmpty = true
mnemonicPrefix = true
renames = copies
[user]
name = jdhao
email = jdhao@hotmail.com