-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig-personnal
111 lines (100 loc) · 3.02 KB
/
.gitconfig-personnal
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
[user]
email = [email protected]
name = Olivier Duquesne
signingkey = 63F60C2C
[push]
default = simple
[merge]
ff = only
[gc]
reflogExpire = never
reflogExpireUnreachable = never
[rerere]
enabled = true
[rebase]
autosquash = true
[color]
ui = always
[gpg]
program = /usr/bin/gpg
[commit]
gpgsign = true
verbose = true
[core]
excludesfile = ~/.gitignore_global
whitespace = trailing-space,space-before-tab
autocrlf = input
# pager = delta --theme='Monokai Extended'
pager = delta
[interactive]
diffFilter = delta --color-only --features=interactive
[delta]
features = decorations
[delta "interactive"]
keep-plus-minus-markers = false
[delta "decorations"]
commit-decoration-style = blue ol
commit-style = raw
file-style = omit
hunk-header-decoration-style = blue box
hunk-header-file-style = red
hunk-header-line-number-style = "#067a00"
hunk-header-style = file line-number syntax
# [http]
# proxy = http://proxy.home:3128
#
# https://gist.github.com/mghignet/06e239a312efac607e7a92457387d8a6
# Discard all changes on your local branch and go back to the version you have on the remote branch
# Put this in your .gitconfig
[alias]
dammit = !BRANCH=$(git rev-parse --abbrev-ref HEAD) \
&& git fetch origin $BRANCH \
&& git reset --hard origin/$BRANCH
# Usage: git dammit
# https://gist.github.com/mghignet/154da1507d53e759f7ed868f1ef87809
# Modify any commit of your history in one command (shorthand)
# Put this in your .gitconfig
fixup = !sh -c 'SHA=$(git rev-parse $1) \
&& git commit --fixup $SHA \
&& git rebase -i --autosquash $SHA~' -
pr = pull-request
nb = !git checkout --track $(git config branch.$(git rev-parse --abbrev-ref HEAD).remote)/$(git rev-parse --abbrev-ref HEAD) -b
p = push
st = status -sb
ll = log --oneline
last = log -1 HEAD --stat
cm = commit -m
rv = remote -v
d = diff
gl = config --global -l
se = !git rev-list --all | xargs git grep -F
ff = merge --ff-only @{upstream}
# Usage: git fixup {sha1}
# EMOJI-LOG
# https://github.com/ahmadawais/Emoji-Log
# Git Commit, Add all and Push — in one step.
cap = "!f() { git add .; git commit -m \"$@\"; git push; }; f"
# NEW.
new = "!f() { git cap \"📦 NEW: $@\"; }; f"
# IMPROVE.
imp = "!f() { git cap \"👌 IMPROVE: $@\"; }; f"
# FIX.
fix = "!f() { git cap \"🐛 FIX: $@\"; }; f"
# RELEASE.
rlz = "!f() { git cap \"🚀 RELEASE: $@\"; }; f"
# DOC.
doc = "!f() { git cap \"📖 DOC: $@\"; }; f"
# TEST.
tst = "!f() { git cap \"🤖 TEST: $@\"; }; f"
# BREAKING CHANGE.
brk = "!f() { git cap \"‼️ BREAKING: $@\"; }; f"
# Remove gone git branches when removed from remote
gone = "!f() { git fetch --all --prune; git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D; }; f"
[help]
autocorrect = 20
[credential "https://github.com"]
helper =
helper = !/usr/bin/gh auth git-credential
[credential "https://gist.github.com"]
helper =
helper = !/usr/bin/gh auth git-credential