-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
70 lines (63 loc) · 2.3 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
[user]
email = [email protected]
name = Ilya Punko
[commit]
gpgsign = false
[pull]
rebase = false
[core]
autocrlf = input
safecrlf = false
editor = nvim
; npm i -g diff-so-fancy
pager = "diff-so-fancy | less --tabs=4 -RFX"
diffFilter = "diff-so-fancy --patch"
[color]
ui = auto
[diff-so-fancy]
markEmptyLines = false
[alias]
l = log --color --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --max-count 12
lm = log --color --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --max-count 1000
a = add -A
f = fetch origin
ch = checkout
# checkout previous
chp = checkout @{-1}
chd = checkout develop
chb = checkout -b
c = commit -am
ca = commit --amend --no-edit
s = !sh -c 'git add -A && git stash'
sa = stash apply
pl = pull origin
plr = !sh -c 'git pull origin $1 --rebase' --
plnr = !sh -c 'git pull origin $1 --no-rebase' --
# discard staged changes
dsc = !sh -c 'git add -A && git stash && git sa' --
# fast commit
fc = !sh -c 'git add -A && git commit -m "DRAFT" --no-verify' --
plh = !git pull origin $(git rev-parse --abbrev-ref HEAD)
p = push origin
ph = push origin HEAD
phforce = push origin HEAD -f
d = diff HEAD
d1 = diff HEAD~1
ds = diff HEAD --shortstat
ds1 = diff HEAD~1 --shortstat
# list branches sorted by last modified
b = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate
bd = branch -D
# branch list
bl = for-each-ref --count 10 --sort=-committerdate --format='%(color:yellow)%(refname:short)%(color:reset) %(color:green)%(committerdate:relative) %(color:red)%(contents:subject)%(color:reset)' --color refs/heads
bdr = push -d origin
m = merge
ce = config --global --edit
rs = !sh -c 'git reset --soft HEAD~$1 && git dsc' --
refresh = !sh -c 'git reset --hard HEAD~100 && git plh' --
rc = rebase --continue
ra = rebase --abort
cp = cherry-pick
create-pr = !sh -c 'gh pr create --fill-first -w'
[difftool]
prompt = true