-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitconfig
86 lines (85 loc) · 4.62 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
[transfer]
fsckobjects = true
[core]
editor = emacs -nw -Q --eval '(column-number-mode t)'
[pager]
status
[color]
ui = true
[log]
decorate
[diff]
## TODO Consider [not splitting multi-byte UTF-8 characters](https://github.com/git/git/blob/v2.15.1/userdiff.c#L12).
wordRegex = [[:alnum:]_-]+|[^[:space:]]
[diff "textract"]
## In `.gitattributes` of repo, add e.g. `*.pdf diff=textract`.
textconv = textract
[diff "tesseract"]
## In `.gitattributes` of repo, add e.g. `*.pdf diff=tesseract`.
textconv = textract -m tesseract
[diff "tshark"]
## In `.gitattributes` of repo, add e.g. `*.pcapng diff=tshark`.
textconv = tshark -r
[diff "tsharkv"]
## In `.gitattributes` of repo, add e.g. `*.pcapng diff=tsharkv`.
textconv = tshark -VP -r
[diff "pem"]
## In `.gitattributes` of repo, add e.g. `*.pem diff=pem`.
textconv = openssl asn1parse -i -in
[diff "radare2"]
## In `.gitattributes` of repo, add e.g. `*.exe diff=radare2`.
textconv = "sh -c 'rabin2 -gAEu -K sha256 \"${1:?}\" && radare2 -q -e scr.color=false -e cfg.fortunes=false -A -c \"fs symbols\" -c \"pdr @@ *\" \"${1:?}\"' radare2"
[diff "sh3x"]
## In `.gitattributes` of repo, add e.g. `*.sh3x diff=sh3x` and `*.sh3d diff=sh3x`.
## See also `git.hooks.pre-commit.sh3x`.
textconv = "sh -c '7z l -slt \"${1:?}\" && echo && 7z e -so \"${1:?}\" Home.xml' 7z"
[grep]
lineNumber
[commit]
cleanup = scissors
[alias]
s = status -uno
su = status -u
sui = status -u --ignored
b = branch --list -v
ba = branch --list -v -a
tl = tag -l
tlr = ls-remote --tags
lo = log --graph --date='format:%Y-%m' --pretty='tformat:%C(yellow)%>|(11)%h%Creset %C(bold)%s%Creset%C(auto)%>>|(72)%d%Creset %C(dim)%ad%Creset'
l = log --graph --date='short' --pretty='tformat:%C(yellow)%>|(11)%h%Creset %C(bold)%s%Creset%C(auto)%>>|(72)%d%Creset %C(dim)%ad%Creset %C(dim)<%an>%Creset%+b'
ll = log --graph --date='iso' --pretty='tformat:%C(yellow)%>|(11)%h (%t)%Creset %C(bold)%s%Creset%C(auto)%>>|(72)%d%Creset %C(dim)%ad%Creset %C(dim)<%an>%Creset%+b' -M --find-copies-harder --stat
lf = log --graph --pretty=fuller -M --find-copies-harder --stat
lp = log --graph --date='iso' --pretty='tformat:%C(yellow)%>|(11)%h (%t)%Creset %C(bold)%s%Creset%C(auto)%>>|(72)%d%Creset %C(dim)%ad%Creset %C(dim)<%an>%Creset%+b' -M --find-copies-harder --stat -p --color-moved --no-textconv
lw = log --graph --date='iso' --pretty='tformat:%C(yellow)%>|(11)%h (%t)%Creset %C(bold)%s%Creset%C(auto)%>>|(72)%d%Creset %C(dim)%ad%Creset %C(dim)<%an>%Creset%+b' -M --find-copies-harder --stat -p -w --color-moved --no-textconv
lc = log --graph --date='iso' --pretty='tformat:%C(yellow)%>|(11)%h (%t)%Creset %C(bold)%s%Creset%C(auto)%>>|(72)%d%Creset %C(dim)%ad%Creset %C(dim)<%an>%Creset%+b' -M --find-copies-harder --stat -p -w --color-words --no-textconv
g = grep
## Pass `--cached` to any of the following `d*` aliases for staged/cached changes.
d = diff -M --find-copies-harder --color-moved --no-textconv
dw = diff -M --find-copies-harder -w --color-moved --no-textconv
dc = diff -M --find-copies-harder -w --color-words --no-textconv
f = fetch
fglmr = "!f() { git fetch \"${2:-origin}\" +refs/merge-requests/${1:?}/head:refs/remotes/\"${2:-origin}\"/pull/${1:?}; }; f"
fghpr = "!f() { git fetch \"${2:-origin}\" +refs/pull/${1:?}/head:refs/remotes/\"${2:-origin}\"/pull/${1:?}; }; f"
fghprs = "!f() { git fetch \"${1:-origin}\" +refs/pull/*/head:refs/remotes/\"${1:-origin}\"/pull/*; }; f"
bd = branch -d
td = tag -d
t = tag ## [Lightweight tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging#_lightweight_tags)
ta = tag -a ## [Annotated tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging#_annotated_tags)
co = checkout
a = add
ci = commit
wip = commit -a -m wip
amend = commit --amend
rb = rebase
rbi = rebase -i
rbi2 = rebase -i HEAD~2
rbi3 = rebase -i HEAD~3
rbc = rebase --continue
rbs = rebase --skip
rba = rebase --abort
cp = cherry-pick
cpc = cherry-pick --continue
cpa = cherry-pick --abort
purge = clean -d -x
[include]
path = ~/.gitconfig_local