-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitconfig
56 lines (56 loc) · 2.07 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
[alias]
bw = blame -w -M
c = commit
commend = commit --amend --no-edit
cc = commit --all --amend --no-edit
ca = commit --all
co = checkout
cb = "!f() { git co `git log --until=\"$*\" -1 --format=%h`; } ; f"
s = status --short
d = diff
dc = diff --cached --word-diff=color
dw = diff --word-diff=color
l = log
a = add
af = add -f
p = push
dt = difftool
mt = mergetool
ss = show -1 --format=%B--stat
sw = show -1 --format=%B--stat --word-diff=color
whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short
whatadded = log --diff-filter=A
lg = log --graph --pretty=format:'%Cred%h%Creset %C(yellow)%an%d%Creset %s [%N] %Cgreen(%ar)%Creset' --date=relative
lgd = log --graph --pretty=format:'%Cred%h%Creset %C(yellow)%an%d%Creset %s [%N] %Cgreen(%ar)%Creset' --date=default
lgm = log --graph --pretty=format:'%Cred%h%Creset %C(yellow)%an%d%Creset %s [%N] %Cgreen(%ar)%Creset' --date=relative --author=AUTHOR_EMAIL
abbr = "!sh -c 'git rev-list --all | grep ^$1 | while read commit; do git --no-pager log -n1 --pretty=format:\"%H %ci %an %s%n\" $commit; done' -"
refeature = "!f() { git co develop && git pull && git co $1 && git pull && git rebase develop; } ; f"
ffmerge = "!f() { git refeature $1 && git co develop && git merge $1; } ; f"
clearbranch = "!f() { git branch -d $1 && git push origin :$1; } ; f"
please = push --force-with-lease
set-upstream = !git branch --set-upstream-to=origin/`git branch --show-current`
wip = for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads
cop = checkout - # checkout to the previous branch
pu = !git push --set-upstream origin `git branch --show-current` # git push with setting up-stream
[color]
ui = always
[core]
pager = less -x1,5
fileMode = true
editor = vim
autocrlf = false
[push]
default = current
[branch]
autosetuprebase = remote
[merge]
tool = vimdiff
guitool = gvimdiff
conflictstyle = diff3
[mergetool]
prompt = false
[diff]
tool = vimdiff
guitool = gvimdiff
[difftool]
prompt = false