-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_gitconfig
59 lines (58 loc) · 1.65 KB
/
dot_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
[user]
name = Filippo Bonazzi
email = [email protected]
[push]
default = simple
[core]
excludesfile = ~/.gitignore
pager = delta
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true
hyperlinks = true
line-numbers = true
keep-plus-minus-markers = true
[grep]
lineNumber = true
[diff]
colorMoved = default
tool = meld
[difftool]
prompt = false
[difftool "meld"]
cmd = meld "$LOCAL" "$REMOTE"
[merge]
tool = meld
[mergetool "meld"]
cmd = meld "$LOCAL" "$BASE" "$REMOTE" --output "$MERGED"
[core]
editor = vim
#pager = "less -eFiJM~ -j3"
[alias]
shortgraph = "log --graph --oneline --all --decorate --topo-order"
graph = "log --graph --all --decorate --topo-order"
simplegraph = "log --graph --all --decorate --topo-order --simplify-by-decoration"
logstat = "log --stat"
stash-unapply = !git stash show -p | git apply -R
permission-reset = "!git diff -p | grep -E \"^(diff|old mode|new mode)\" | sed -e \"s/^old/NEW/;s/^new/old/;s/^NEW/new/\" | git apply"
# Gitlab MR alias
mrr = !sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git switch mr-$1-$2' -
mr = "mrr origin"
# Github PR alias
prr = !sh -c 'git fetch $1 pull/$2/head:pr-$1-$2 && git switch pr-$1-$2' -
pr = "prr origin"
# Git open remote in browser
website-url = "!f() { \
git remote get-url $1 | perl -pe 's,^(?:.*@)?(?:https://)?([^:\\n]*?)?:?([^:\\n]*?)?(?:\\.git)?$,https://$1/$2,'; \
}; f"
website-url-open = "!f() { \
git remote get-url $1 | perl -pe 's,^(?:.*@)?(?:https://)?([^:\\n]*?)?:?([^:\\n]*?)?(?:\\.git)?$,https://$1/$2,' | xargs xdg-open; \
}; f"
open = "website-url-open origin"
[color]
ui = auto
[commit]
gpgsign = true
[column]
ui = auto