-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
39 lines (35 loc) · 1.25 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
[core]
excludesfile = ~/.gitignore_global
pager = diff-so-fancy | less --tabs=4 -RFX
editor = nvim
ignorecase = false
[push]
default = current
autoSetupRemote = true
[alias]
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg = !"git lg1"
# List tags (in order)
tg = tag --sort=v:refname
# typos
statsu = status
comit = commit
commmit = commit
# shortcuts
b = branch
cc = rev-list HEAD --count
co = checkout
d = diff --relative
dc = diff --cached --relative
pfl = push --force-with-lease
pr = pull --rebase
rp = pull --rebase
rom = rebase origin/master
s = status
rh = reset HEAD
res = restore --staged
cleanup = !"git branch --merged | egrep -v '^(\\*.+|(\\s+master)?)$' | xargs git branch -d && git remote prune origin"
sync="!git stash && git pull --rebase && git stash pop"
[init]
defaultBranch = master