-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
55 lines (55 loc) · 1.97 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
[core]
excludesfile = ~/.gitignore_global
deltaBaseCacheLimit = 1G
[autosetup]
rebase = true
[branch]
autosetuprebase = remote
autosetupmerge = true
mergeoptions = --no-commit --no-ff
[color]
branch = auto
diff = auto
interactive = auto
status = auto
ui = true
[credential]
helper = osxkeychain
[push]
default = current
[alias]
addremove = !git add -A && git ls-files --deleted -z | xargs -0 git rm
ar = !git addremove
br = branch
bra = branch -a
ci = commit
co = checkout
cp = cherry-pick
dc = diff --cached
dci = duet-commit
di = diff
g = log --pretty=format:\"%h %an - %s\" --graph
gg = log --pretty=format:\"%H %an - %s\" --graph
lc = log ORIG_HEAD.. --stat --no-merges
lg = log --oneline
ll = log --pretty=format:'%Cred%h %Cblue%an %Cgreen%s / %Cblue%ar%Creset' --abbrev-commit -n15
pp = !git pull --rebase && git push
pr = pull --rebase
st = status
s = status --short
w = whatchanged
pull-ff = pull --ff-only
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; gvim `f`"
add-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`"
down = !sh -c 'CURRENT=$(git symbolic-ref HEAD | sed -e s@.*/@@) \
&& (git pull --ff-only || (git fetch origin && git rebase --preserve-merges origin/$CURRENT))'
publish = "!f() { if [ $# -ne 1 ]; then echo 'usage: git publish <local-branch-name>' >&2; exit 1; fi; git push --set-upstream origin $1:$1; }; f"
unpublish = "!f() { if [ $# -ne 1 ]; then echo 'usage: git unpublish <remote-branch-name>' >&2; exit 1; fi; git push origin :$1; }; f"
tidy = "!git remote prune origin 2>/dev/null; echo \"$(git branch -vv | grep origin | tr '[]*?+' ' ')\" | egrep -v \"$(git branch -r | awk '{print $1}')\" | awk '{print $1}' | xargs git branch -d 2>/dev/null"
refresh = "!git checkout master && git fetch && git pull --rebase && git tidy"
t = "!git tidy"
r = "!git refresh"
[merge]
tool = vimdiff
[url "[email protected]:"]
insteadOf = https://gitlab.com/