-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
65 lines (65 loc) · 1.86 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
[alias]
a = add
b = branch
bd = !git config --get branch.$(git branch --show-current).description
bde = branch --edit-description
bs = branch --sort=-committerdate
bx = "!f() { local targetBranch=${1:-master} && git checkout -q $targetBranch && git for-each-ref refs/heads/ \"--format=%(refname:short)\" | while read branch; do mergeBase=$(git merge-base $targetBranch $branch) && [[ $(git cherry $targetBranch $(git commit-tree $(git rev-parse $branch^{tree}) -p $mergeBase -m _)) == \"-\"* ]] && echo $branch; done; }; f"
c = commit --verbose
ca = commit --verbose --amend
cb = checkout -b
cd = checkout develop
cm = checkout master
co = checkout
cp = cherry-pick
cpa = cherry-pick --abort
cpc = cherry-pick --continue
d = diff
dc = diff --cached
dw = diff --word-diff
fa = fetch --all --prune
g = grep --fixed-strings --ignore-case --untracked --break --heading --line-number
gp = !git push origin $(git branch --show-current)
gpf = !git push --force-with-lease origin $(git branch --show-current)
gu = !git pull --rebase origin $(git branch --show-current)
lo = log --pretty='%C(yellow)%h%C(reset) ·%C(red)%d%C(reset) %s %C(green)(%cr) %C(blue)<%an>%C(reset)'
m = merge
mt = mergetool
rb = rebase
rba = rebase --abort
rbb = rebase --committer-date-is-author-date --update-refs
rbc = rebase --continue
rbi = rebase --interactive
rbs = rebase --skip
rh = reset HEAD
rhh = reset HEAD --hard
st = status
sta = stash push
stl = stash list
stp = stash pop
sts = stash show
undo = reset HEAD~1
wipe = clean --interactive --force -dx
[color "diff"]
meta = cyan
[color "grep"]
filename = cyan
linenumber = yellow
separator = yellow
[core]
editor = vim
pager = less -+FX
[diff]
colorMoved = default
[fetch]
prune = true
[init]
defaultBranch = master
[merge]
tool = vimdiff
[mergetool]
keepBackup = false
[pull]
rebase = true
[rebase]
updateRefs = true