-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitconfig
61 lines (49 loc) · 1.71 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
# vim: filetype=gitconfig
[core]
autocrlf = input
[alias]
git = !git $1 # make `git git status` work https://twitter.com/iamtzi/status/1112088211755597827
st = status
co = commit
lg = log --graph --all
lasttag = "!bash -c 'git tag | cut -dv -f 2 | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tail -n 1'"
lt = "!bash -c 'git tag | cut -dv -f 2 | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tail -n 1'"
latest-branches = "!bash -c \"git reflog | grep 'checkout: moving' | awk -F ' to ' '{print \\$2}' | awk '!seen[\\$0]++' | head -n 20\""
composer = commit -m 'update composer' composer.*
pushtags = push --tags
ptom = push origin HEAD --tags
syncbr = "!bash -c 'git fetch --prune && git branch --merged | grep -v main | grep -v master | xargs -n 1 git branch -d'"
changelog = "!f() { git commit CHANGELOG.md -m \"update changelog for $(git lasttag)\"; }; f"
diff-side="-c delta.side-by-side=true diff"
fixup="!f() { git commit --fixup $1 && GIT_SEQUENCE_EDITOR=: git rebase -i $1~1 --autosquash; }; f"
[color]
ui = auto
[format]
pretty = format:%C(blue)%h%C(reset) - %C(cyan)%aD%C(reset) %C(green)(%ar)%C(reset)%C(yellow)%d%C(reset)%n %C(white)%s%C(reset) %C(white) %an%C(reset)
[help]
autocorrect = 1
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red
new = cyan
[color "status"]
added = yellow
changed = green
untracked = cyan
[url "[email protected]:"]
insteadOf = gh:
[url "[email protected]:"]
insteadOf = bb:
[fetch]
prune = true
[diff]
colorMoved = zebra
[push]
autoSetupRemote = true
[rebase]
autosquash = true