-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
99 lines (97 loc) · 3.45 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
98
99
[core]
pager = delta -s
excludesfile = ~/.gitignore
editor = nvim
[alias]
l = log --pretty=custom
lg = log --graph --pretty=custom -20
undo = reset --soft HEAD^
compare = diff --cached # view the changes you staged for the next commit relative to HEAD
unstage = reset HEAD --
amend = commit --amend -m
cpick = cherry-pick
cleanup = "!git branch --merged | grep -v '\\*\\|master\\|develop\\|main' | xargs -n 1 git branch -d"
last = log -1 HEAD
bl = blame -w -C # ignore whitespace changes and follow code movement commits
fpush = push --force-with-lease # force push will fail if someone updated the remote ref (not overriding their changes by accident)
[filter "lfs"]
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
[pull]
rebase = true
[rebase]
autoStash = true # Stash and pop uncommitted changes on rebase
autosquash = true
[init]
defaultBranch = main
[gpg]
program = /usr/local/bin/gpg # linux: /usr/bin/gpg
[merge]
conflictstyle = diff3
tool = vimdiff
[mergetool "vimdiff"]
path = nvim
keepBackup = false
[diff]
colorMoved = default
[push]
autoSetupRemote = true
followTags = true
[interactive]
diffFilter = delta --color-only
[rerere]
enabled = true # remember each side of a conflict and apply the recorded resolution next time the same conflict reappears.
autoUpdate = true
[branch]
sort = -committerdate
[column]
ui = auto
[pretty]
custom = "%C(blue)%h %C(green) %s %C(magenta)%(decorate:prefix=,suffix=,tag= ,pointer= ) %n%C(cyan) %an %C(cyan)%ar%n"
# │ │ │ │ └─ date relativ
# │ │ │ └─ author name
# │ │ └─ decorations(branch, heads or tags)
# │ └─ message
# └─ hash (abbreviated)
; [split-diffs] # alternative to delta
# turn off syntax highlighting
# syntax-highlighting-theme =
[delta]
dark = true
diff-hightlight = true
file-decoration-style = black ul
file-style = "#b5bfe2"
hunk-header-decoration-style = omit
hunk-header-file-style = "#b5bfe2"
hunk-header-line-number-style = bold "#b5bfe2"
hunk-header-style = file line-number
hunk-label = " @@@"
hyperlinks = true
hyperlinks-file-link-format = "vscodium://file/{path}:{line}"
line-numbers = true
line-numbers-left-format = {nm:>3}│
line-numbers-left-style = "#838ba7"
line-numbers-minus-style = "#838ba7"
line-numbers-plus-style = "#838ba7"
line-numbers-right-format = {np:>3}│
line-numbers-right-style ="#838ba7"
line-numbers-zero-style ="#838ba7"
minus-emph-style = white bold "#85494a"
minus-style = red
plus-emph-style = white bold "#467050"
plus-style = green
side-by-side = true
true-color = auto
zero-style = "#838ba7"
[user]
#configered in `~/.gitconfig.local`
[include]
# Load local configs.
# https://git-scm.com/docs/git-config#_includes
#
# [!] The following needs to remain at the end of this file in
# order to allow any of the above configs to be overwritten
# by the local ones
path = ~/.gitconfig.local