-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitconfig
154 lines (132 loc) · 3.69 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
[user]
name = NicholasClooney
email = 137233165+NicholasClooney@users.noreply.github.com
[init]
defaultBranch = main
[color]
ui=auto
[core]
pager = delta
editor = vim
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true # use n and N to move between diff sections
[merge]
conflictstyle = diff3
[diff]
colorMoved = default
[push]
default = current
[credential]
helper = osxkeychain
[filter "media"]
clean = git media clean %f
smudge = git media smudge %f
required = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[submodule]
recurse = true
[alias]
a = add
aa = add --all
ac = !git aa && git c
amd = commit --amend
ap = add -p
b = branch
bm = branch --move
c = commit -v
ca = commit --amend
cc = checkout -
cd = checkout develop
ci = check-ignore -v
cl = clone
cm = checkout master
co = checkout
; Must have fzf installed
cof = !git branch --all | grep -v HEAD | fzf | xargs git checkout
; commits = !open (git ls-remote --get-url origin | sed 's/\.git/\/commits/g')
cot = !git tag | fzf | xargs git checkout
count = !git rev-list --count $(git name)
cp = cherry-pick
d = diff
dc = diff --cached
dd = !git d develop
; delete remote branch
dr = !git push origin :$(git name)
ds = diff --stat
dss = diff --shortstat
delete-all = rm -r '*'
destroy = !git delete-all && rm -rf ~/.git
f = fetch
h = !git head
hard-reset = reset --hard
head = !GIT_NO_PAGER=1 git l -1
hp = !git log -1 -p --pretty="tformat:" | delta
hr = reset --hard
; issues = !open (git ls-remote --get-url origin | sed "s/\.git/\/issues/g")
l = log --graph --pretty='[%G?] %C(yellow)%h (%cr)%Cblue %an%C(magenta)%d%Creset %s'
la = !git l --all
ls = ls-files
ls-binaries = !~/bin/git-binaries
lsd = ls-tree -d HEAD
lso = ls-files --others
lp = log -p
m = merge
m2m = !branch=$(git name) && git cm && git mff $branch
m2d = !branch=$(git name) && git cd && git mff $branch
md = merge develop
mod = merge origin/develop
me = config --get user.name
mab = merge --abort
mff = merge --ff-only
n = checkout -b
name = rev-parse --abbrev-ref HEAD
no = !git count
nuke = !git reset --hard && git clean -df
p = push
po = !git push -u origin $(git symbolic-ref --short HEAD)
pc = !git pp && git bc
pp = pull
# Pen Pineapple Apple Pen
# No seriously: pull --rebase and push
ppap = !echo "Pen Pineapple Apple Pen" && git ppr && git p
ppr = pull --rebase
pt = push --tags
r = !GIT_NO_PAGER=1 git l -10
rr = !GIT_NO_PAGER=1 git l -50
ra = remote add origin
rbabt = rebase --abort
rbc = rebase --continue
rh = !~/bin/checkout-history
ri = rebase -i
rs = reset
size = !git count-objects -vH
s = status --short --branch
sc = !git s | grep -E '^(U.|.U)' | sed -e 's/.U //g' -e 's/U. //g' -e 's/.*/\"&\"/g' # show merge conflicts
scc = !git s | grep -E '^(U.|.U)'
search = log --grep
st = stash save
stc = stash clear
stl = stash list
stp = stash pop
undo = !git add --all && git stash && git reset --hard
untracked = !git lfo
whathaveidone = !git log --pretty='%C(yellow) %h (%cr)%C(magenta)%d%Creset %s' --all --author=$(git me)
today = !git whathaveidone --since 7am
week = !git whathaveidone --since 'This Monday'
lastweek = !git whathaveidone --since 'Last Monday' --until 'Last Friday'
# GitHub
pr = !open $(git ls-remote --get-url origin | sed "s/\\\\.git/\\\\/compare\\\\/$(git name)/g")
prs = !open $(git ls-remote --get-url origin | sed "s/\\\\.git/\\\\/pulls/g")
repo = !open $(git ls-remote --get-url origin | sed "s/\\\\.git/\\\\//g")
[magithub]
online = false
[magithub "status"]
includeStatusHeader = false
includePullRequestsSection = false
includeIssuesSection = false