-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_gitconfig
More file actions
102 lines (102 loc) · 2.82 KB
/
dot_gitconfig
File metadata and controls
102 lines (102 loc) · 2.82 KB
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
94
95
96
97
98
99
100
101
102
[user]
name = Bob Black
email = git@riblack.com
[core]
safecrlf = false
; pager ; see .profile GIT_PAGER
[color]
ui = true
[delta]
diff-so-fancy = true
syntax-theme = Dracula
line-numbers = true
[diff]
; colorMoved = default
[alias]
ai = add -i
ap = add --patch
b = branch
blv = branch -lvv --sort=-committerdate
ca = commit -v --amend
ci = commit
cli = clean -di
co = checkout
coh = !git checkout $(git head) && git pf
cop = checkout --patch
conb = checkout --no-track -b
cou = git checkout @{upstream}
cv = commit -v
d = diff
dbh = diff origin... # ignores changes since branching
dbhs = dbh --stat
dbu = diff @{upstream}...
dc = diff --cached
dd = diff --word-diff-regex .
dni = diff --no-index # compare two paths to each other (not their git state)
do = diff --ours
doh = diff origin
ds = diff --stat
dt = diff --theirs
du = diff @{upstream}
dw = diff --word-diff
f = fetch
fp = fetch --prune
fco = !git fetch && git co
fdom = !git fetch && git dom
flom = !git fetch && git lom
flpm = !git fetch && git lpm
flsm = !git fetch && git lsm
ft = fetch --tags # when a tag is updated
gone = !git fp && git for-each-ref --format '%(refname:short) %(upstream:track)' refs/heads | awk '$2 == \"[gone]\" {print $1}'
gone-delete = !git gone | xargs git branch -D
head = !git symbolic-ref --short refs/remotes/origin/HEAD | sed 's{^origin/{{'
lo = log --oneline
loh = !git lo origin/HEAD...
lom = !git lo origin/master...
lou = !git lo @{upstream}...
lp = log --patch
lph = !git lp origin/HEAD...
lpm = !git lp origin/master...
lpu = !git lp @{upstream}...
ls = log --stat
lsm = !git ls origin/master...
lsu = !git ls @{upstream}...
m = !echo 'using coh\n' && git coh
mbc = !git m && git branch-clean
mm = !git fetch && git merge --no-ff origin/master
mnf = merge --no-ff
nb = new-branch
pf = pull --ff-only
pl = pull
pu = push
puo = push -u origin HEAD # `HEAD` pushes to branch of same name
r = reset
rh = reset --hard
rhu = reset --hard "@{upstream}"
ro = rebase origin
roh = !git fetch && git rebase origin/HEAD
rp = reset --patch
ru = !git fetch && git rebase "@{upstream}"
rui = !git fetch && git rebase -i "@{upstream}"
s = status
sl = stash list
slp = stash list --patch
sls = stash list --stat
sp = stash pop
ss = stash show
ssp = stash show --patch
# highlight single character changes, add before command `git subword <command>`
subword = "!f() { cmd=\"$1\"; shift; git \"$cmd\" --word-diff-regex='\\w' \"$@\"; }; f"
sv = stash save
svp = stash save --patch
svu = stash save --include-untracked
[push]
default = simple # default >= 2.2.2; `puo` alias used for initial push
[color "branch"]
upstream = bold blue
[hub]
protocol = ssh
[init]
defaultBranch = main # git 3.0 default
[rebase]
autoSquash = true