-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitconfig
136 lines (119 loc) · 3.94 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
[user]
name = Christoph Gysin
email = christoph.gysin@gmail.com
[core]
editor = vim
#whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
[alias]
st = status
di = diff
dc = diff --cached
ci = commit
co = checkout
sl = shortlog
br = branch
bv = branch -vv
bn = rev-parse --abbrev-ref HEAD
rv = remote -v
tb = !git switch --track=direct --create ${1} ${2:-$(git upstream)} || :
rst = reset
rh = reset --hard
pick = cherry-pick
l = !git --no-pager log --oneline ${1:-HEAD}
lol = log --graph --abbrev
lola = log --graph --abbrev --all
lom = !git --no-pager log $(git upstream)..
los = !git --no-pager log --oneline $(git upstream)..${1}
lof = !git --no-pager show --oneline --name-only
ls = !git --no-pager show --pretty="format:" --name-only
e = !vim $(git ls ${1}) || :
k = !gitk
ka = !gitk --all
unstage = reset HEAD --
last = log -1 HEAD
upstream = rev-parse --abbrev-ref --symbolic-full-name @{u}
amend = commit --amend -v
pr = pull --rebase
prp = !git pull --rebase && git push origin ${1:-HEAD}:${2:-master}
prfm = !git push origin ${1:-HEAD}:refs/for/master || :
rb = !git rebase $(git upstream)
rbi = !git rebase -i $(git upstream)
rbc = rebase --continue
rba = rebase --abort
rbs = rebase --skip
rbe = !GIT_SEQUENCE_EDITOR=: git rebase -i --exec \"${1}\" $(git upstream) || :
resolve = !vim $(git ls-files --modified | uniq)
frbi = !git fetch origin && git rebase -i $(git upstream)
brl = !git branch | cut -c3-
reball = !"for b in $(git brl); do git co $b && git rb || git rb --abort; done"
freball = !git fetch origin && git reball
backup = push -f --mirror echrgys-bare
log-grep = !git log --color=always --grep \"${1}\" | sed \"s/${1}/$(tput setaf 1)\\\\0$(tput sgr0)/g\" && :
rewind = reset --soft HEAD^
sed = !args=(\"$@\") && git ls-files -z \"${args[@]:1}\" | xargs -0 sed --follow-symlinks -i \"$1\" && :
g = !git --no-pager grep
gl = !git --no-pager grep -l
ge = !args=(\"$@\") && vim $(git --no-pager grep -l \"${args[@]}\")
sg = !git-submodule-grep
find = !git ls-files | grep
f = !git find
fe = !args=(\"$@\") && vim $(git f \"${args[@]}\")
gerrit = !ssh -p 29418 echrgys@gerrit gerrit
reviewers = !git gerrit set-reviewers -a
conflict = !vim $(git diff --name-only --diff-filter=U)
#xclone = "!\
# repo=$1 && \
# project=${2:-advtp} && \
# cd ${GIT_PREFIX:-.} && \
# git -C \"${repo}\" config remote.pushDefault origin && \
# :"
web = !open $(GIT_CONFIG_GLOBAL=/dev/null git remote get-url origin)
ghpr = !git tb "pr${1}" && git fetch $(git upstream | cut -d/ -f1) refs/pull/${1}/head && git rh FETCH_HEAD && :
[remote]
#pushDefault = origin
[color]
branch = auto
diff = auto
interactive = auto
status = auto
#[apply]
# whitespace = fix
[push]
default = current
[github]
user = christophgysin
#token = xxx
[sendemail]
from = "Christoph Gysin <christoph.gysin@gmail.com>"
smtpencryption = tls
smtpserver = smtp.gmail.com
smtpuser = christoph.gysin@gmail.com
smtpserverport = 587
[mergetool "vimdiff3"]
cmd = vim -f -d -c \"wincmd J\" \"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\"
[merge]
tool = vimdiff3
[diff "odf"]
textconv = odt2txt
[diff "json"]
textconv = jq .
[diff]
#algorithm = patience
algorithm = histogram
[include]
path = .gitconfig.local
[url "git@github.com:"]
insteadOf = https://github.com
[url "git@gitlab.com:"]
insteadOf = https://gitlab.com
[url "git@bitbucket.org:"]
insteadOf = https://bitbucket.org
[url "ssh://git@3stepgitssh.eficode.com:7999/"]
insteadOf = https://3stepgit.eficode.com/scm
[url "aur@aur.archlinux.org:"]
insteadOf = https://aur.archlinux.org
[credential]
helper = !aws codecommit credential-helper $@
UseHttpPath = true
[init]
defaultBranch = main