-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitconfig
93 lines (91 loc) · 3.05 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
[core]
# Use custom `.gitignore`
excludesfile = /Users/guillaume.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 = delta
[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 = [email protected]
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFmTe4tid3GTcR676yUat7Bg8w7Yuxe2KZJo78l9iKgq
[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 --tac | 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
colorMoved = default
[merge]
tool = vimdiff
conflictstyle = diff3
[credentials]
helper = cache
[rerere]
enabled = true
[rebase]
autoStash = true
[pull]
rebase = true
[init]
defaultBranch = main
[interactive]
diffFilter = delta --color-only
[help]
autocorrect = prompt
[fsmonitor]
socketDir = /Users/g.clochard/.git-fsmonitor
[delta]
navigate = true
line-numbers = true
[gpg]
format = ssh
[gpg "ssh"]
program = /Applications/1Password.app/Contents/MacOS/op-ssh-sign
[commit]
gpgsign = true
[pack]
usePathWalk = true