-
Notifications
You must be signed in to change notification settings - Fork 13
/
.gitconfig
93 lines (93 loc) · 3.27 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
87
88
89
90
91
92
93
[alias]
aa = add .
ag = reset HEAD^ # again
b = branch
bd = branch -D
br = branch
ca = commit --all
cb = checkout -b
changed = update-index --no-assume-unchanged # revert op of `git unchanged`
ci = commit
cm = commit --amend --no-edit --all
cme = commit --amend --edit --all --allow-empty
co = checkout
crp = cherry-pick
d = diff
dfl = diff --name-status # diff and list name
dfs = diff --staged
dl = diff HEAD^
f = fetch origin --tags
g = grep -in # ignore case, line number
hide = update-index --assume-unchanged # same with `git unchanged`
last = log -1 HEAD
ld = stash pop
load = stash pop
logg = log --graph --decorate --oneline --abbrev-commit --all # VERY VERY useful command
logo = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --no-merges
logs = log --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
mgf = merge --ff-only
p = push
pa = push --all
pd = push origin HEAD -f
pf = push -f
pl = pull --rebase
po = push origin
ps = push
pt = push --tags
pua = push -u origin HEAD:alpha-only -f
pull = pull --rebase
puo = push -u origin
puz = push -u z
rb = rebase
rbc = rebase --continue
rbi = rebase -i # if there's only one git command you should learn, it'll be `git rebase`
rd = rebase origin/HEAD
rdi = rebase origin/HEAD -i
regret = reset HEAD^ # regret last commit, same with `git ag`
rg = reset HEAD^ # regret
rh = reset --hard
rhd = reset --hard origin/HEAD
rp = remote prune
rpo = remote prune origin
rroo = remote rename origin o
rs = reset
save = stash
slog = log --graph --decorate --oneline --all --simplify-by-decoration
sm = submodule
squash = rebase HEAD~2 -i
st = status
sv = stash
unchanged = update-index --assume-unchanged # assume a file is unchanged, often use to change some local config
unhide = update-index --no-assume-unchanged # same with `git changed`
wj = commit --all --message 'JIRA-123: WIP' --allow-empty --no-verify # commit with Jira: Work In Progress quickly
wp = commit --all --message 'feat: WIP' --allow-empty --no-verify # commit with Work In Progress quickly
yes = log --oneline --since yesterday --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --no-merges # see what's new since yesterday
[core]
autocrlf = false # don't mess up crlf
editor = vim
eol = lf # use unix style line endings
excludesfile = ~/.gitignore # global gitignore file
filemode = false # filemode is strange under windows
ignorecase = false # don't ignore case
pager = less --raw-control-chars -x2
[color]
ui = true
[init]
defaultBranch = master
[merge]
tool = vimdiff
[push]
autoSetupRemote = true
default = simple
[user]
name = Lirian Su
email = liriansu@gmail.com
signingkey = D7D3E9BB905FE002
[commit]
gpgsign = true
[github]
user = LKI
[safe]
directory = C:/Users/lirian/.lki
[advice]
skippedCherryPicks = false