-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
136 lines (118 loc) · 3.89 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
[alias]
exec = ! "exec"
st = status -sb
versions = tag -l --sort=version:refname
br = branch -vv
bra = branch -vv --all
bed = branch --edit-description
brs = branch -a
au = add --update :/
unstage = reset -q HEAD --
uncommit = reset --mixed HEAD~
coa = ! "coa() { git add --all :/ && git commit -m \"$1\"; }; coa"
ci = commit -v -m
ca = commit --amend -v -m # ammend commit with message
phf = push --force
save = commit -a -m "Save"
co = checkout
di = diff
dis = diff --stat
diw = diff --color-words
dc = diff --cached
dcs = diff --cached --stat
dcw = diff --cached --color-words
dh = diff HEAD~
dhs = diff HEAD~ --stat
dhw = diff HEAD~ --color-words
du = diff @{u}...
dus = diff @{u}... --stat
duw = diff @{u}... --color-words
grp = grep -C 1
ff = merge --ff-only
noff = merge --no-ff
f = fetch --tags --prune
fa = fetch --all --tags --prune
pullrb = pull --rebase
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
credit = shortlog -sn
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"
cc = rev-list HEAD --count
cca = rev-list --all --count
lg = log -p
gr = log --graph --format=line # graph
grd = log --graph --format=detail # graph detail
gra = log --graph --format=line --all # graph all
grad = log --graph --format=detail --all # graph all in detail
sf = show --format=fuller --show-signature
sfw = show --format=fuller --color-words
sfs = show --format=fuller --stat
showtool = ! "st() { if [ -z $1 ]; then c='HEAD'; else c=$1; fi; git difftool $c~..$c; }; st"
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
stsh = stash --keep-index
staash = stash --include-untracked
update-submodules = submodule update --init --recursive
upgrade-submodules = submodule update --init --remote
root = rev-parse --show-toplevel
delete-local-merged = "!git fetch && git branch --merged | egrep -v 'main' | xargs git branch -d"b
tar = ! "tar() { git archive --format tar --prefix=\"${PWD##*/}/\" HEAD -o ${1}; }; tar"
zip = ! "zip() { git archive --format zip --prefix=\"${PWD##*/}/\" HEAD -o ${1}; }; zip"
fuckedup = ! "fup() { git reset --hard && git clean -df;}; fup"
[init]
defaultBranch = main
[diff]
mnemonicPrefix = true
wordRegex = "[^[:space:]]|([[:alnum:]]|UTF_8_GUARD)+"
compactionHeuristic = true
[color]
ui = auto
[color "grep"]
match = cyan bold
selected = blue
context = normal
filename = magenta
linenumber = green
separator = yellow
function = blue
[pretty]
line = "%C(auto)%h %<|(60,trunc)%s %C(green)%ad%C(auto)%d"
detail = "%C(auto)%h %s%n %C(yellow)by %C(blue)%an %C(magenta)<%ae> [%G?] %C(green)%ad%n %C(auto)%d%n"
[merge]
defaultToUpstream = true
tool = vimdiff
[pull]
ff = only
[mergetool]
keepBackup = false
[push]
default = upstream
autoSetupRemote = true
[credential]
helper = cache --timeout=3600
[grep]
lineNumber = true
extendRegexp = true
[advice]
detachedHead = false
waitingForEditor = false
[user]
useConfigOnly = true
signingkey = 0x6811B6CD9AFC722A
email = [email protected]
[http]
cookieFile = ~/.gitcookies
[core]
excludesfile = ~/.gitignore_global
[url "https://github.com/"]
insteadOf = git://github.com/
# Allow local customizations in the .gitconfig_local file
[include]
path = ~/.gitconfig_local
[commit]
gpgsign = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true