-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
109 lines (90 loc) · 2.87 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
[include]
path = ~/.gitconfig.local
[core]
pager = delta
excludesfile = ~/.gitignore_global
hooksPath = ~/.git-hooks/
[alias]
alias = ! git config --get-regexp ^alias\\. | sed -e s/^alias\\.// -e s/\\ /\\ =\\ /
bsu = ! git branch --set-upstream-to=origin/$(git branch --show-current)
psu = ! git push --set-upstream origin $(git branch --show-current)
p = pull
pf = push --force-with-lease
c = checkout
co = commit -a
com = ! git commit -am \"$COMMIT_MESSAGE\"
coma = commit --amend
comac = commit --amend -C HEAD
cl = ! git clone $(xclip -o)
r = reflog -25
s = status
cb = checkout -b
mt = mergetool
l = log -1 --format=format:%s
lh = log -1 --format=%h
plog = log --reverse --abbrev-commit -15 --decorate --format=format:'%C(bold yellow)%h%C(reset) - %C(white)%s%C(reset)%n %C(red)%an%C(reset) %C(dim white)(%ar)%C(reset)%d%C(reset)%n'
slog = log --reverse --abbrev-commit -15 --decorate --format=format:'%C(white)%ci%C(reset) %C(yellow)%s%C(reset) %C(dim white)%an%C(reset)%d%C(reset)'
graph = log --graph --all --abbrev-commit -50 --decorate --format=format:'%C(bold yellow)%h%C(reset) - %C(white)%s%C(reset)%n %C(red)%an%C(reset) %C(dim white)(%ar)%C(reset)%d%C(reset)%n'
wip = ! git commit -am \"WIP: $COMMIT_MESSAGE - $(date)\"
dr = ! git diff origin/$(git branch --show-current)
b = branch
br = branch -r
st = ! git stash -m \"$COMMIT_MESSAGE\"
mt = mergetool
cp = cherry-pick
pp = ! git pull && git push
# Work done, interactively rebases from common ancestor
wd = ! git rebase -i $(git merge-base origin/master $(git rev-parse --abbrev-ref HEAD))~1
[pull]
rebase = true
[init]
defaultBranch = main
[credential]
helper = store
# Extra Tools
# vim-mergetools
[merge]
tool = nvimdiff
conflictstyle = diff3
[mergetool "vimdiff"]
cmd = vim -f -c "MergetoolStart" "$MERGED" "$BASE" "$LOCAL" "$REMOTE"
trustExitCode = true
prompt = false
keepBackup = false
[mergetool "nvimdiff"]
layout = "LOCAL,BASE,REMOTE / MERGED"
trustExitCode = true
prompt = false
keepBackup = false
# Delta
[interactive]
diffFilter = delta --color-only --features=interactive
[delta]
features = decorations
syntax-theme = gruvbox-dark
paging = never
[delta "interactive"]
; keep-plus-minus-markers = false
[delta "decorations"]
line-numbers = true
commit-style = omit
file-style = omit
hunk-header-decoration-style = orange box
hunk-header-file-style = red
hunk-header-style = file
zero-style = syntax normal dim
minus-style = syntax normal dim strike
plus-style = syntax bold normal
line-numbers-minus-style = red bold
line-numbers-plus-style = green bold
plus-emph-style = syntax bold "#306040"
[color "status"]
header = white italic
branch = magenta italic
added = green bold
changed = yellow bold
untracked = white dim italic
[user]
name = Ilyès Semlali
[tag]
sort = v:refname