-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
119 lines (92 loc) · 2.69 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
[include]
path = ~/.private/gitconfig
# Include different identitites in the private gitconfig
# [user "identity"]
# name = name
# email = email
[user]
useConfigOnly = true
[alias]
st = status
ci = commit
co = checkout
br = branch
l = log --pretty=format:'%Cred%h%Creset %Cgreen%s%Creset [%ar by %an]'
lg = log --graph --pretty=format:'%C(red)%h%C(reset) -%C(yellow)%d%C(reset) %s %C(green)(%cr) %C(blue)<%an>%C(reset)' --abbrev-commit --date=relative
fixup = !sh -c 'git commit --no-verify --fixup=$1' -
squash = !sh -c 'git commit --squash=$1' -
# Github is sorting the commits by their date -> reset it on rebase
# http://stackoverflow.com/questions/1579643/change-timestamps-while-rebasing-git-branch
ri = rebase --interactive --autosquash
amend = !sh -c 'git commit --amend --no-edit' -
changedate = !sh -c 'git commit --amend --no-verify --no-edit --date \"`date -R`\"'
d = diff --color
dc = diff --cached --color
wdiff = diff --color-words
s = show --color
pr = pull --rebase
patch = !git --no-pager diff --no-color
pushf = push --force-with-lease
# https://www.micah.soy/posts/setting-up-git-identities/
identity = "! git config user.name \"$(git config user.$1.name)\"; git config user.email \"$(git config user.$1.email)\"; :" # git config user.signingkey \"$(git config user.$1.signingkey)\";
[colors]
diff = auto
grep = auto
status = auto
ui = auto
[core]
editor = nvim
pager = delta
excludesFile = /Users/zdenek.kostal/.gitignore_global
hooksPath = /dev/null
[push]
default = simple
[commit]
verbose = true
[diff]
compactionHeuristic = true
tool = vimdiff
colorMoved = default
[difftool]
prompt = false
[difftool "vimdiff"]
cmd = nvim -d \"$LOCAL\" \"$REMOTE\"
[merge]
tool = vimdiff
conflictstyle = diff3
[mergetool]
prompt = false
keepBackup = false
[mergetool "vimdiff"]
cmd = nvim -d $LOCAL $BASE $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
[rebase]
autostash = true
[stash]
showPatch = true
[color "diff"]
meta = yellow
commit = green
frag = magenta
old = red
new = green
whitespace = red reverse
[color "diff-highlight"]
oldNormal = red
oldHighlight = red 52
newNormal = green
newHighlight = green 22
[delta]
features = side-by-side line-numbers decorations
syntax-theme = "gruvbox-dark"
[delta "decorations"]
commit-decoration-style = yellow ul
file-style = bold yellow box
file-decoration-style = none
[interactive]
diffFilter = delta --color-only
[branch]
autosetuprebase = always
[diff "exif"]
textconv = exiftool
[init]
defaultBranch = main