-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
80 lines (67 loc) · 2.5 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
[user]
name = pbsinclair42
email = [email protected]
[credential]
helper = cache
[pull]
rebase = true
[push]
default = simple
[commit]
template = ~/.gittemplate
[blame]
date = relative
[core]
hooksPath = ~/.githooks
excludesfile = ~/.gitignore
[grep]
lineNumber = true
extendedRegexp = true
[log]
abbrevCommit = true
[format]
pretty=format:%Cred%h %Creset%s %Cgreen(%cr) %C(bold blue)<%aN>%Creset
[advice]
statusHints = false
[column]
branch = auto column nodense
[rerere]
enabled = true
[alias]
st = status -sb
ad = add
addu = add -u
adu = add -u
pullr = pull --rebase
pulr = pull --rebase
psr = "!git stash && git pull --rebase && git stash pop > /dev/null; git st"
fst = "!git fetch && git status -sb"
fch = "!git fetch && git status -sb"
ri = rebase -i
select = add --patch
pick = add --patch
co = commit
cm = commit -m
uncommit = reset --soft HEAD^
discard = checkout --
fix = commit --amend
di = diff
preview = diff --cached
pr = diff --cached
last = diff --cached HEAD^
difw = diff --word-diff
conflicts = diff --name-only --diff-filter=U
unadd = reset
master = checkout master
contributors = shortlog -s -n
cdiff = !git diff "$@"^!
follow = log --follow --
logs = log --pretty=format:'%n%Cred%h %Creset%s %Cgreen(%cr) %C(bold blue)<%aN>%Creset%+b' --stat
logd = log --pretty=format:'%n%Cred%h %Creset%s %Cgreen(%cr) %C(bold blue)<%aN>%Creset%+b' --patch
logt = log --pretty=format:'%Cred%h %Creset%s %Cgreen(%ci) %C(bold blue)<%aN>%Creset'
lg = "!if [ $(git log | wc -l) -lt 10 ]; then git log; else git log --color=always | head; fi"
me = !git log --author=\"$(git config user.name)\"
history = log --pretty=format:'%n%Cred%h %Creset%s %Cgreen(%cr) %C(bold blue)<%aN>%Creset%+b' --patch --follow
popular = !git log --all -M -C --name-only --format='format:' "$@" | sort | grep -v '^$' | uniq -c | sort -rg | less -FX
graph = !git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
alias = "!git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\t\\2/' | awk 'BEGIN {i=0 ; max=0} {res[i]=$1; $1=\"\"; res[i+1]=$0; res[i+2]=length(res[i]); if(res[i+2]>max)max=res[i+2]; i=i+3; } END {for (j=0;j<i-1;j++){ t=\"\"; for(k=0;k<max-res[j+2];k++){t=t \" \"};print res[j] t,\"=\" res[j+1];j+=2}}' " | less -FX