forked from justone/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
97 lines (86 loc) · 2.89 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
[alias]
st = status
graph = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
amend = commit --amend --no-edit
squash = commit --squash
ci = commit -v
unci = reset HEAD^
uncommit = reset HEAD^
unstage = reset HEAD --
cam = commit -a -m
cav = commit -a -v
br = branch
co = checkout
su = submodule update --init --recursive
ignored = !git ls-files -v | grep "^[a-z]"
ignore = update-index --assume-unchanged
unignore = update-index --no-assume-unchanged
branch-prune = !git branch -vv | grep \"\\[.*: gone\\]\" | cut -d \" \" -f3 | xargs git branch -d
find-merge = "!sh -c 'commit=$0 && branch=${1:-HEAD} && (git rev-list $commit..$branch --ancestry-path | cat -n; git rev-list $commit..$branch --first-parent | cat -n) | sort -k2 | uniq -f1 -d | sort -n | tail -1 | cut -f2'"
show-merge = "!sh -c 'merge=$(git find-merge $0 $1) && [ -n \"$merge\" ] && git show $merge'"
clang-format-ls = "!sh -c 'git ls-files *.c *.h *.cpp *.hpp *.mm *.m -z \"$0\" \"$@\" | xargs -r0 clang-format -i'"
[core]
editor = nvim
filemode = true
autocrlf = input
pager = delta
[branch]
autosetuprebase = always
[fetch]
prune = true
[push]
default = simple
recursesubmodules = check
[pull]
rebase = merges
[rebase]
autostash = true
[stash]
showPatch = true
[submodule]
fetchJobs = 4
[credential]
helper = store
[interactive]
; diffFilter = "diff-highlight"
diffFilter = delta --color-only
[delta]
navigate = true # use n and N to move between diff sections
light = false # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal)
side-by-side = true
line-numbers = true
[diff]
compactionHeuristic = true
tool = bc4
[difftool]
prompt = false
[difftool "bc4"]
cmd = bcomp \"$LOCAL\" \"$REMOTE\"
[difftool "bc4w"]
cmd = \"/mnt/c/Program Files/Beyond Compare 4/BCompare.exe\" \"$(wslpath -w $LOCAL)\" \"`wslpath -w $REMOTE`\"
[difftool "vimdiff"]
cmd = vimdiff \"$LOCAL\" \"$REMOTE\"
[difftool "vscode"]
cmd = code --wait --diff \"$LOCAL\" \"$REMOTE\"
[merge]
tool = bc4
[mergetool]
prompt = false
keepBackup = false
trustExitCode = true
[mergetool "bc4"]
cmd = bcomp \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
[mergetool "bc4w"]
cmd = \"/mnt/c/Program Files/Beyond Compare 4/BCompare.exe\" \"`wslpath -w $LOCAL`\" \"`wslpath -w $REMOTE`\" \"`wslpath -w $BASE`\" \"`wslpath -w $MERGED`\"
[mergetool "vimdiff3"]
cmd = vim -f -d -c \"wincmd J\" \"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\"
[mergetool "vscode"]
# Original way before three-way merge shown commented out
# cmd = code --wait $MERGED
# For "Three-way merge"
cmd = code --wait --merge \"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\"
[merge "releasenotesmerger"]
name = release notes merger
driver = python \"$HOME/projects/coretools/merge_release_notes.py\" %O %A %B
[include]
path = .gitconfig.local