-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitconfig
51 lines (50 loc) · 1.81 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
[user]
name = Jeremy Moseley
email = jeremy@moseley.dev
signingkey = 63CC62FBB3EFC47D
[alias]
mainbranch = "!git remote show origin | grep \"HEAD branch\" | cut -d: -f 2"
co = checkout
cm = !git commit -S -m
st = status
ca = commit --amend -S --no-edit
pf = push -f
p = push
d = diff
ds = diff --staged
cob = checkout -b
ec = config --global -e
up = "!f() { TARGET_BRANCH=$(git mainbranch); git pull origin ${TARGET_BRANCH} && git bclean ${TARGET_BRANCH} && git sclean ${TARGET_BRANCH} && git remote prune origin; }; f"
save = !git add -A && git commit -m 'SAVEPOINT'
wip = !git add -u && git commit -m 'WIP'
undo = reset HEAD~1 --mixed
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard
bclean = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs git branch -d; }; f"
sclean = "!f() { git-delete-squashed ${1-master}; }; f"
squash = "!git rebase -v -i $(git mainbranch)"
pr = "!f() { \
open \"$(git ls-remote --get-url $(git config --get branch.$(git rev-parse --abbrev-ref HEAD).remote) \
| sed 's|git@github.com:\\(.*\\)$|https://github.com/\\1|' \
| sed 's|\\.git$||'; \
)/compare/$(\
git config --get branch.$(git rev-parse --abbrev-ref HEAD).merge | cut -d '/' -f 3- \
)?expand=1\"; \
}; f"
hub = "!f() { \
open \"$(git ls-remote --get-url \
| sed 's|git@github.com:\\(.*\\)$|https://github.com/\\1|' \
| sed 's|\\.git$||'; \
)\"; \
}; f"
[push]
default = current
[rerere]
enabled = true
[credential]
helper = store
[commit]
gpgsign = true
[pull]
rebase = true
[url "ssh://git@github.com/"]
insteadOf = https://github.com/