-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitconfig
52 lines (52 loc) · 1.3 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
# This is Git's per-user configuration file.
[user]
name = David Karlsson
email = [email protected]
[push]
autoSetupRemote = true
default = current
[rerere]
enabled = true
[rebase]
autoSquash = true
autoStash = true
[alias]
last = log -1 HEAD
# print default branch
default = !git branch -rl '*/HEAD' | awk -F/ '{print $NF}'
# log commits on current branch
blog = !git default | xargs git cherry -v
# count commits on current branch
cc = !git rev-list --count HEAD "^$(git default)"
# resume rebase
rbc = rebase --continue
# rebase interactive
rbi = rebase --interactive
# rebase interactive commits on current branch
rbb = !git rebase -i "HEAD~$(git cc)"
# rebase on default branch
rbm = !git rebase "$(git default)"
# force push
pf = push --force
# cherry-pick
cp = cherry-pick -s -x
# commit all, amend, no-edit, sign-off
can = commit --all --amend --no-edit --signoff
# commit all, sign-off
ca = commit --all --signoff
# commit, sign-off
c = commit --signoff
# pull upstream, current branch
lu = !git pull upstream "$(git rev-parse --abbrev-ref HEAD)"
# checkout
co = checkout
# checkout new branch
cb = checkout -b
# rename branch
bm = branch -m
# checkout default branch
cm = !git checkout "$(git default)"
# status
st = status --short
[pull]
ff = only