-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitconfig
86 lines (86 loc) · 2.83 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
[alias]
a = add
alias = "!f() { git config --get-regexp ^alias. | cut -c7- | grep -E \"${1}\" --color=always | sed 's/ /\t/'; }; f"
amend = commit --amend --allow-empty
ap = add -p
b = branch
bl = blame
branches = "!git for-each-ref --sort=-committerdate refs/heads --format='%(HEAD) %(color:magenta)%(objectname:short)|%(color:yellow)%(refname:short)|%(color:bold green)%(committerdate:relative)|%(color:blue)%(subject)|%(color:cyan)%(authorname)%(color:reset)' --color=always | column -ts'|'"
br = "!setterm -linewrap off; git branches; setterm -linewrap on;"
bri = "!git branches | fzf --ansi | sed 's/*//' | awk '{ print $2; }' | xargs tig --stdin"
ch = checkout
c = commit
cm = commit -m
co = checkout
coi = "!git branches | fzf --ansi | sed 's/*//' | awk '{ print $2; }' | xargs git checkout"
contributors = shortlog --email --summary --numbered
cp = cherry-pick
d = diff
ds = diff --staged
f = fetch --all
fp = fetch --all --prune
fixup = "!git log -n 15 --oneline --color=always | fzf --ansi | awk '{ print $1 }' | xargs git commit --fixup"
l = log -n 15 --graph --date-order --date=relative --pretty='format:%C(red)%h%C(reset)%C(auto)%d%C(reset) %s %C(green)(%cr) %C(yellow) %an %C(reset)'
m = merge
mainormaster = !"git branch --format '%(refname:short)' --sort=-committerdate --list master main | head -n1"
oops = commit --amend --no-edit
pfl = push --force-with-lease
rb = rebase
rba = rebase --abort
rbc = rebase --continue
rbi = rebase -i
reuse = commit --reuse-message
rs = reset
s = status -s
sh = show
shs = show --stat
squash = "!git log -n 15 --oneline --color=always | fzf --ansi | awk '{ print $1 }' | xargs -o git commit --squash"
st = status
sw = switch
sync = "!git fetch && git reset --hard @{upstream}"
upstream = rev-parse --abbrev-ref HEAD@{upstream}
wip = "!git add . && git commit --no-verify -m 'WIP'"
[blame]
coloring = highlightRecent
[branch]
sort = -committerdate
[color "blame"]
highlightRecent = blue,6 month ago,green,1 month ago,brightGreen
[color "diff"]
newMoved = cyan
oldMoved = blue dim
[commit]
verbose = true
[core]
attributesfile = ~/.gitattributes
editor = vim
excludesfile = ~/.gitignore_global
pager = "if [ $COLUMNS -gt 130 ]; then P='delta --side-by-side'; else P='delta'; fi; $P"
[delta]
line-numbers-minus-style = tomato
line-numbers-plus-style = green
navigate = true
tabs = 2
true-color = always
wrap-max-lines = unlimited
[diff]
algorithm = histogram
colorMoved = default
[diff "javascript"]
xfuncname = "^((.*)(class|const|function|let|get|set|static|=>|(.*)[^ ]\\((.*)\\)) (.*)\\{)$"
[help]
autocorrect = prompt
[init]
defaultBranch = main
[pull]
rebase = merges
[push]
autoSetupRemote = true
default = simple
[rebase]
autosquash = true
updateRefs = true
[rerere]
enabled = true
[stash]
showPatch = true