-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_gitconfig.tmpl
49 lines (42 loc) · 1.38 KB
/
dot_gitconfig.tmpl
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
[user]
{{ if eq .chezmoi.os "darwin" }}email = [email protected]{{ else if contains "easypo" .chezmoi.fqdnHostname }}email = [email protected]{{ end }}
name = Kevin Chien
[submodule]
recurse = true
[merge]
conflictstyle = diff3
[branch]
sort = -authordate
[grep]
lineNumber = true
[alias]
st = status
ci = commit
br = branch
co = checkout
# Clean deleted branches on remote
rpo = remote prune origin
# new local branch and matching remote branch with your name prefixed
nb = !sh -c 'git push origin HEAD:`whoami`/$0 && git checkout -t origin/`whoami`/$0'
# remove local and remote branch
db = !sh -c 'git push origin :`whoami`/$0 && git br -d `whoami`/$0'
# new tag
nt = !sh -c 'git tag $0 -am \"$1\" && git push --tags origin'
# delete tag
dt = !sh -c 'git tag -d "$0" && git push origin :refs/tags/$0'
# uncommit / undo commit
uc = reset --soft HEAD^
# unstage changes / undo stage
us = reset HEAD
# git log with graph
lol = log --graph --decorate --pretty=oneline --abbrev-commit
# new ignore
ig = update-index --assume-unchanged
# undo ignore
ui = update-index --no-assume-unchanged
# show merged branches
sm = branch --merged
# delete merged branches
dmb = !sh -c 'git branch --merged | egrep -v \"(^\\*|master|dev)\" | xargs git branch -d' -
[url "[email protected]:"]
insteadOf = https://github.com/