-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
97 lines (83 loc) · 2.06 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
[user]
name = Melissa Xie
email = [email protected]
[core]
excludesfile = ~/.gitignore
[color]
ui = auto
interactive = auto
branch = auto
diff = auto
status = auto
[color "status"]
untracked = cyan
[alias]
a = add -v
aa = add -Av
cam = commit -v --amend
ap = add -p
b = branch
bd = branch -D
br = browse
cah = commit --amend -C HEAD
cf = config
cm = commit -v
co = checkout
cp = cherry-pick
d = diff
dc = diff --cached
dm = diff main
ds = diff --stat
l = log
lc = !sh -c 'git log -1 --format=format:%H' | pbcopy # copy last commit message
lg = log --graph --pretty=format:'%Cred%h%Creset - %s %Cgreen(%an - %cr)%Creset' --abbrev-commit --date=relative
lm = log main..
m = merge --ff-only
nb = checkout -b
p = push
pc = !git push && git lc
pf = push -f
pop = stash pop
r = rebase
ra = rebase --abort
ri = rebase -i
rim = rebase -i main
sm = commit -Sv
sf = show --name-only
st = status
uc = uncommit
uf = unfuck
us = unstage
current-branch = rev-parse --abbrev-ref HEAD
uncommit = reset HEAD^
unfuck = !sh -c 'branch=$(git current-branch) && git reset --hard origin/$branch'
unstage = reset HEAD
con = !git add -A && git rebase --continue
# delete any local branches that have already been merged
db = !git branch --merged | grep -v main | xargs git branch -d
# Merge current branch into main, only if it's a fast-forward. Doesn't check
# out main if it's not a FF merge.
mm = !test `git rev-parse main` = $(git merge-base HEAD main) && git checkout main && git merge HEAD@{1} || echo "Non-fastforward"
up = !git co main && git pull && git co - && git rebase main
[push]
# Push current branch even if you've never pushed it before
default = current
[help]
autocorrect = 1
[credential]
helper = osxkeychain
[gpg]
program = /usr/local/bin/gpg2
[github]
user = mxie
[fetch]
prune = true
[diff]
colorMoved = zebra
[pull]
ff = only
[filter "lfs"]
clean = git-lfs clean -- %f
process = git-lfs filter-process
required = true
smudge = git-lfs smudge -- %f