-
Notifications
You must be signed in to change notification settings - Fork 7
/
gitconfig
118 lines (106 loc) · 3.36 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# vim:ft=toml
[alias]
a = add
aa = add -A
b = branch
bl = blame -CCC
c = commit
ca = commit -a
caa = commit -a --amend -CHEAD
cl = clean -fd
cleanup = "!git branch --merged | grep -v '\\*\\|master\\|develop' | xargs -n 1 git branch -d"
co = checkout
col="! source $HOME/.adshell/functions ; git_checkout_fzf"
com="! source $HOME/.adshell/functions ; git checkout $(_master_branch)"
copr = "!git fetch origin pull/$1/head:pr$1 && git checkout -q pr$1 && echo Switched to PR"
cp = cherry-pick
d="! source $HOME/.adshell/functions && git_diff_fzf"
dc="! source $HOME/.adshell/functions && git_diff_fzf --cached"
ff = merge --ff-only
l = log --graph --pretty=format:'%<(10)%C(bold green)%h%C(reset) %><(16)%C(yellow)%ar%C(reset) %<(16)%C(blue)%an%Creset %C(auto)%d%C(reset) %s' --abbrev-commit
ls = shortlog -sn
m = merge
mf = merge --no-ff
mt = mergetool
rename = branch -m
n = checkout -b
new = checkout -b
patch = !git --no-pager diff --no-color
po = "!git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)"
punch = push --force-with-lease
prune-remote = !"git fetch -p && for branch in $(git branch -vv | grep ': gone]' | awk '{print $1}'); do git branch -D $branch; done"
rb = rebase
rba = rebase --abort
rbc = rebase --continue
rbm = rebase -i origin/master
rc = rebase --continue
rom = reset --hard origin/master
s = status -bs
sb = show-branch
sl = !"git stash list | fzf --preview=\"echo {} | cut -d':' -f1 | xargs git stash show --color -p\""
st = status -bs
standup = !"git log --reverse --branches --since='$(if [[ "Mon" == "$(date +%a)" ]]; then echo "last friday"; else echo "yesterday"; fi)' --author=$(git config --get user.email) --format=format:'%C(cyan) %ad %C(yellow)%h %Creset %s %Cred%d' --date=local"
upbase = !"git fetch; git rebase origin/master"
updog = upbase
tags = tag -l
unstage = reset head
vim = !vim .git/index
yolo = commit --no-verify
wc = whatchanged -p --abbrev-commit --pretty=medium
[branch]
autosetuprebase = always
[rebase]
autostash = true
updateRefs = true
[rerere]
enabled = true
[core]
excludesfile = ~/.adshell/gitignore
attributesfile = ~/.adshell/gitattributes
pager = delta --dark --diff-so-fancy
[commit]
verbose = true
[color]
ui = auto
[push]
default = current
[init]
defaultBranch = master
[diff]
meta = "yellow"
frag = "magenta bold"
commit = "yellow bold"
old = "red bold"
new = "green bold"
whitespace = "red reverse"
[diff-highlight]
oldNormal = "red bold"
oldHighlight = "red bold 52"
newNormal = "green bold"
newHighlight = "green bold 22"
[diff "ansible-vault"]
textconv = ansible-vault view
[merge]
keepBackup = false
defaultToUpstream = true
tool = nvimdiff
[mergetool]
keepBackup = false
prompt = false
[mergetool "diffmerge"]
cmd = "diffmerge --merge --result=\"$MERGED\" \"$LOCAL\" \"$(if test -f \"$BASE\"; then echo \"$BASE\"; else echo \"$LOCAL\"; fi)\" \"$REMOTE\""
trustExitCode = true
[url "git@github.com:"]
insteadOf = "gh:"
pushInsteadOf = "github:"
pushInsteadOf = "git://github.com/"
[url "git://github.com/"]
insteadOf = "github:"
[url "git@gist.github.com:"]
insteadOf = "gst:"
pushInsteadOf = "gist:"
pushInsteadOf = "git://gist.github.com/"
[url "git://gist.github.com/"]
insteadOf = "gist:"
[url "git@heroku.com:"]
insteadOf = "heroku:"