-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitconfig
More file actions
95 lines (95 loc) · 4.49 KB
/
gitconfig
File metadata and controls
95 lines (95 loc) · 4.49 KB
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
# vim: filetype=gitconfig:
[user]
name = Immanuel Haffner
email = haffner.immanuel@gmail.com
[core]
excludesfile = ${HOME}/.gitignore
autocrlf = input
pager = delta
# Enable FSMonitor, Git's built-in file system monitor daemon.
fsmonitor = true
# This feature adds an extension to the index that remembers the results of the untracked search.
untrackedcache = true
# Use a commit history cache to significantly speed up history operations, such as git log with the --graph option,
# because the sorting is the time-consuming action of this command.
commitgraph = true
[feature]
# Inform Git that it is managing a large repository.
# This setting will enable a newer index file version that is smaller in size and thus gets rewritten faster after
# modifying files in the index.
manyFiles = true
[interactive]
diffFilter = delta --color-only
[delta]
line-numbers = true
navigate = true
[diff]
mnemonicPrefix = true # use descriptive initials (c/i/w)
renames = true # show renames
tool = nvimdiff
colorMoved = dimmed-zebra
colorMovedWS = ignore-space-at-eol,ignore-space-change
[difftool]
prompt = true
[difftool "nvimdiff"]
cmd = nvim -d $LOCAL $REMOTE
[merge]
tool = nvimdiff
defaultToUpstream = true
conflictstyle = zdiff3
[mergetool]
prompt = true
[mergetool "nvimdiff"]
cmd = nvim -d $BASE $LOCAL $MERGED $REMOTE -c '$wincmd w' -c 'wincmd J' -c 'wincmd w' -c 'wincmd k' -c 'wincmd w' -c 'wincmd l'
[push]
default = tracking
[color]
status = auto
branch = auto
ui = auto
[alias]
bvv = branch -vv
ca = commit -a -v
cat = cat-file -p
ci = commit -v
co = checkout
conflict = !nvim -c '/^[<=|>]\\{7\\}' -p $(git ls-files --unmerged | cut -c 51- | uniq)
d = diff
dc = diff --cached
dh = diff HEAD
dt = difftool
get = pull --recurse-submodules --tags --prune
lg = log --graph --format=format:'%C(bold yellow reverse)%h%C(reset) %C(bold white)— %C(bold red)%an%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(reset)%w(120,0,10)%s' --abbrev-commit
lga = log --all --graph --format=format:'%C(bold yellow reverse)%h%C(reset) %C(bold white)— %C(bold red)%an%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(reset)%w(120,0,10)%s' --abbrev-commit
long = log --stat --decorate --graph --show-signature
mr = push -o merge_request.create -o merge_request.target=main -o merge_request.draft
mwps = push -o merge_request.create -o merge_request.target=main -o merge_request.merge_when_pipeline_succeeds
reword = commit --amend
st = status
stat = diff --stat
uncommit = reset --soft HEAD~1
untrack = rm --cache --
upbase = rebase @{u}
linestat = ! "f() { git ls-files | while read f; do git blame -w -M -C -C --line-porcelain \"$f\" | grep -I '^author '; done | sort -f | uniq -ic | sort -n --reverse; }; f"
pp = "!bash -c \"new_args=(); remote=\\\"\\\"; ref=\\\"\\\"; start=0; if [[ \\$0 == \\\"bash\\\" ]]; then start=1; fi; for ((i=start; i<=\\$#; i++)); do arg=\\${!i}; if [[ \\\"\\$arg\\\" != -* ]]; then if [[ \\\"\\$remote\\\" == \\\"\\\" ]]; then remote=\\\"\\$arg\\\"; new_args+=(\\\"\\$arg\\\"); else if [[ \\$ref == \\\"\\\" ]]; then ref=\\\"\\$arg\\\"; fi; if [[ \\\"\\$ref\\\" != immanuel-haffner_data/* ]]; then new_args+=(\\\"\\$arg:immanuel-haffner_data/\\$arg\\\"); else new_args+=(\\\"\\$arg\\\"); fi; fi; else new_args+=(\\\"\\$arg\\\"); fi; done; if [[ \\$remote == \\\"\\\" ]]; then new_args+=(\\\"origin\\\"); fi; if [[ \\$ref == \\\"\\\" ]]; then branch=\\$(git branch --show-current); if [[ \\\"\\$branch\\\" != immanuel-haffner_data/* ]]; then new_args+=(\\\"\\$branch:immanuel-haffner_data/\\$branch\\\"); else new_args+=(\\\"\\$branch\\\"); fi; fi; git push -u \\\"\\${new_args[@]}\\\"\" "
[github "emu"]
[commit]
gpgsign = true
[rerere]
enabled = true
autoupdate = true
[init]
defaultBranch = main
[pull]
rebase = true
[fetch]
prune = true
pruneTags = true
# This configuration tells the git gc command (mentioned previously) to update the commit-graph file during
# non-trivial garbage collection, which is much less demanding than a full GC operation.
writeCommitGraph = true
[tag]
sort = version:refname # sort tags as version numbers, i.e. 1.2.0 before 1.10.2
[include]
# Machine-local overrides and maintenance repo list (not version-controlled)
path = ${HOME}/.gitconfig.local