-
Notifications
You must be signed in to change notification settings - Fork 7
/
gitconfig
60 lines (48 loc) · 1.33 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
[alias]
ci = commit
cim = commit -m
ciam = commit -am
co = checkout
st = status
br = branch
diffc = diff --cached
pl = pull
ps = push
pls = "!git pull && git push"
pick = cherry-pick
uncommit = reset --soft HEAD^
amend = commit -a --amend -C HEAD
amendm = commit -a --amend # amend with message
rmuntracked = "!git ls-files --others --exclude-standard | xargs rm"
l = log --pretty=format:'%h %an %Cred%ar %d %Cgreen%s'
rmb = !sh -c 'git branch -D $1 && git push origin :$1' -
adrc = "!git add . && git rebase --continue"
unpushed = !"PROJ_BRANCH=$(git symbolic-ref HEAD | sed 's|refs/heads/||') && git log origin/$PROJ_BRANCH..HEAD"
unpulled = !"PROJ_BRANCH=$(git symbolic-ref HEAD | sed 's|refs/heads/||') && git fetch && git log HEAD..origin/$PROJ_BRANCH"
[apply]
whitespace = nowarn
[diff]
rename = copy
[color]
branch = auto
diff = auto
status = auto
[color "branch"]
current = green
local = blue
remote = yellow
#normal status has added/changed = green untracked/deleted/conflic = red -> more colors
[color "status"]
added = yellow
changed = green
untracked = cyan
[pager]
color = true
[core]
excludesfile = $HOME/.gitignore
[push]
default = current
[branch]
autosetuprebase = always # rebase when pulling
[rerere]
enabled = true # store resolved rebase steps even when aborted