-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitconfig
More file actions
98 lines (87 loc) · 4.03 KB
/
gitconfig
File metadata and controls
98 lines (87 loc) · 4.03 KB
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
[alias]
exec = ! "exec"
s = status -sb
br = branch -vv
bra = branch -vv --all
bed = branch --edit-description
aa = add --all :/
ci = commit -v
ca = commit --amend -v
co = checkout
cp = cherry-pick
di = diff
dis = diff --stat
diw = diff --color-words
dc = diff --cached
dcs = diff --cached --stat
dcw = diff --cached --color-words
dh = diff HEAD~1
dhs = diff HEAD~1 --stat
dhw = diff HEAD~1 --color-words
ff = merge --ff-only
noff = merge --no-ff
fa = fetch --all --prune
pullff = pull --ff-only
mirror-remote = ! "mr() { git push \"${2}\" \"refs/remotes/${1}/*:refs/heads/*\" && git remote set-head \"${2}\" -a; }; mr"
count = diff --stat "4b825dc642cb6eb9a060e54bf8d69288fbee4904" # hash of empty tree
churn = ! "ch() { git log --all -M -C --name-only --format='format:' \"$@\" | sort | grep -v '^$' | uniq -c | sort | awk 'BEGIN { print \"count\tfile\" } { print $1 \"\t\" $2 }' | sort -g; }; ch"
credit = ! "cdt() { git shortlog -sn | awk '{ for (i = 2; i < NF; i++) printf $i \" \"; print $NF }' | while read name; do echo \"$(git log --format=\"%h\" --author=\"${name}\" | wc -l)\t${name}\t$(git log --numstat --pretty=\"%h\" --author=\"${name}\" | awk 'NF == 3 { plus += $1; minus += $2 } END { printf(\"[+%d, -%d]\", plus, minus) }')\"; done | column -t -s \"$(printf \"\t\")\"; }; cdt"
linecredit = ! "lc() { git ls-tree --name-only -z -r HEAD | xargs -0 -n1 git diff --no-index --numstat /dev/null 2>/dev/null | grep -v '^-' | cut -f 3- | cut -d ' ' -f 3- | xargs -n1 git blame --line-porcelain | grep '^author ' | cut -d ' ' -f 2- | sort | uniq -c | sort -nr; }; lc"
lg = log -p
gr = log --graph --format=compact # graph
grl = log --graph --format=line # graph line
grd = log --graph --format=detail # graph detail
gra = log --graph --format=compact --all # graph all
gral = log --graph --format=line --all # graph all line
grad = log --graph --format=detail --all # graph all in detail
sf = show --format=fuller
sfs = show --format=fuller --stat
info = ! "inf() { if git rev-parse ${1} >/dev/null 2>&1; then git cat-file -p $(git rev-parse ${1}); else echo Invalid object; fi }; inf"
cleanall = clean -fdx # this is dangerous, so it's intentionally long to type
update-submodules = submodule update --init --recursive
upgrade-submodules = submodule update --init --remote
empty-tree-hash = hash-object -t tree /dev/null
root = rev-parse --show-toplevel
ctags = ! "ctg() { trap \"rm -f .git/tags.$$\" EXIT; ctags --tag-relative -Rf.git/tags.$$ --exclude=.git; mv .git/tags.$$ .git/tags; }; ctg"
explain = ! "exp() { if git config --get alias.${1} >/dev/null 2>&1; then echo git $(git config --get alias.${1}) ${@:2}; else echo Nonexistant alias; fi }; exp"
tar = ! "tar() { git archive --format tar --prefix=\"${PWD##*/}/\" HEAD -o ${1}; }; tar"
targz = ! "targz() { git archive --format tar.gz --prefix=\"${PWD##*/}/\" HEAD -o ${1}; }; targz"
zip = ! "zip() { git archive --format zip --prefix=\"${PWD##*/}/\" HEAD -o ${1}; }; zip"
mt = mergetool
up = pull --rebase --autostash
[color]
ui = auto
[pretty]
line = "%C(auto)%h%d %s %C(yellow)by %C(blue)%an %C(green)%ar"
compact = "%C(auto)%h %s %C(green)%ar%n %C(auto)%d%n"
detail = "%C(auto)%h %s%n %C(yellow)by %C(blue)%an %C(magenta)<%ae> %C(green)%ar%n %C(auto)%d%n"
[merge]
defaultToUpstream = true
tool = kdiff3
[mergetool]
keepBackup = false
[push]
default = matching
[grep]
lineNumber = true
[advice]
detachedHead = false
[github]
user = zamber
[core]
excludesfile = ~/.gitignore
# Allow local customizations in the .gitconfig_local file
[include]
path = ~/.gitconfig_local
[credential]
helper = /usr/libexec/git-core/git-credential-libsecret
[user]
email = piotr.zaborowski@synergycodes.com
name = Piotr Zaborowski
signingKey = 9F93F34DA253C1E2482B657995B61C4C6E75E72D
[commit]
gpgSign = true
[tag]
forceSignAnnotated = true
[gpg]
program = gpg