/
.gitconfig
78 lines (78 loc) · 2.75 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
[core]
# Use custom `.gitignore`
excludesfile = /Users/g.clochard/.gitignore_global
# Treat spaces before tabs, lines that are indented with 8 or more spaces, and all kinds of trailing whitespace as an error
whitespace = space-before-tab,indent-with-non-tab,trailing-space
ignorecase = false
editor = "nvim"
hooksPath = "~/.home/git/hooks"
fsmonitor = false
pager = diff-so-fancy | less --tabs=4 -RFX
[color]
# Use colors in Git commands that are capable of colored output when outputting to the terminal
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[user]
name = Guillaume Clochard
email = guillaume.clochard@blablacar.com
[filter "media"]
clean = git-media-clean %f
smudge = git-media-smudge %f
[push]
default = simple
followTags = true
autoSetupRemote = true
[alias]
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
lg = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lastid = log --format="%H" -n 1
rp = rebase -p
rebasei =! git rebase -i --autosquash $(git --no-pager ls -n 50 | fzf | cut -d' ' -f1)
rebaseo =! git rebase $(git branch -a | grep origin | fzf | cut -d'/' -f2-)
rebasel =! git rebase $(git branch -a | grep -v origin | fzf | cut -d'/' -f2-)
rc =! git rebase --continue
ra =! git rebase --abort
fix =! git commit --fixup $(git --no-pager ls -n 50 | fzf | cut -d' ' -f1)
fixh =! git commit --fixup $(git --no-pager ls -n 50 | grep -v fixup! | fzf | cut -d' ' -f1)
addf =! git status --short | fzf -m | awk '{$1=$1}1' | cut -d' ' -f2- | xargs git add
restoref =! git status --short | fzf -m | awk '{$1=$1}1' | cut -d' ' -f2- | xargs git restore
showf =! git show $(git --no-pager ls -n 50 | fzf | cut -d' ' -f1)
difff =! git status --short | fzf -m | awk '{$1=$1}1' | cut -d' ' -f2- | xargs git diff
switchf =! git switch $(git branch -a | sed 's/remotes\\/origin\\///g' | cut -c 3- | sort -u | fzf)
fa =! git fetch -a
pushf =! git push --force-with-lease
[diff]
tool = vimdiff
algorithm = histogram
[merge]
tool = vimdiff
conflictstyle = zdiff3
[credentials]
helper = cache
[rerere]
enabled = true
[rebase]
autoStash = true
[pull]
rebase = true
[init]
defaultBranch = main
[interactive]
diffFilter = diff-so-fancy --patch
[help]
autocorrect = prompt
[fsmonitor]
socketDir = /Users/g.clochard/.git-fsmonitor