/
gitconfig
56 lines (53 loc) · 1.27 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
[user]
name = Fredrik Averpil
email = fredrik.averpil@gmail.com
# for github only, fredrikaverpil@users.noreply.github.com
[core]
excludesfile = ~/.gitignore_global
# editor = code --wait # vscode
editor = nvim
[pull]
ff = only
[merge]
# tool = vscode
# tool = neovim
tool = diffview
[mergetool "vscode"]
cmd = code --wait $MERGED
[mergetool "neovim"]
cmd = nvim -d $LOCAL $REMOTE $BASE $MERGED
[mergetool "diffview"]
cmd = nvim -c \"DiffviewOpen\"
[mergetool]
prompt = false
[diff]
# tool = vscode
tool = neovim
# tool = diffview
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
[difftool "neovim"]
cmd = nvim -d $LOCAL $REMOTE
[difftool "diffview"]
cmd = nvim -d \"$LOCAL\" \"$REMOTE\" -c \"DiffviewOpen\"
[difftool]
prompt = false
[init]
defaultBranch = main
[rebase]
autostash = true
[commit]
template = ~/.gitmessage
[push]
autoSetupRemote = true
# Git commit signing
[include]
path = ~/.gitconfig_1password
# GitHub https authentication
[credential "https://github.com"]
helper = !/opt/homebrew/bin/gh auth git-credential
[credential "https://gist.github.com"]
helper = !/opt/homebrew/bin/gh auth git-credential
# Always keep gitconfig for work at bottom of this file
[includeIf "gitdir:~/code/work/**/.git"]
path = ~/.gitconfig_work