-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_gitconfig.tmpl
More file actions
68 lines (68 loc) · 1.61 KB
/
Copy pathdot_gitconfig.tmpl
File metadata and controls
68 lines (68 loc) · 1.61 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
[alias]
fpush = push --force-with-lease
# https://stackoverflow.com/a/34467298
tree = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
# https://stackoverflow.com/a/28502292
sync = !"f() { \
if [ -z \"$1\" ]; then \
echo \"Error: Branch name required. Usage: git sync <branch>\"; \
return 1; \
fi; \
git fetch --prune upstream && \
git stash && \
git rebase upstream/$1 $1 && \
git stash pop; \
}; f"
[branch]
sort = -committerdate
[branch "master"]
mergeOptions = --no-ff --no-commit
[branch "main"]
mergeOptions = --no-ff --no-commit
[branch "dev"]
mergeOptions = --squash --no-commit
[commit]
gpgsign = true
verbose = true
[core]
pager = delta
autocrlf = input
{{- if eq .chezmoi.os "linux" }}
excludesFile = /home/eleung/.gitignore
{{- else if eq .chezmoi.os "windows" }}
excludesFile = "C:/Users/eleung/.gitignore"
{{ end }}
[delta]
dark = true
navigate = true
side-by-side = true
[diff]
algorithm = histogram
[gpg]
format = ssh
[interactive]
diffFilter = delta --color-only
[merge]
conflictstyle = zdiff3
[pull]
ff = only
[push]
gpgsign = if-asked
followtags = true
[rebase]
abbreviateCommands = true
[submodule]
recurse = true
[tag]
gpgsign = true
sort = -v:refname
[transfer]
fsckobjects = true
[user]
email = contact@ericleung.dev
name = Eric Leung
{{- if eq .chezmoi.os "linux" }}
signingkey = /home/eleung/.ssh/id_ed25519_github_sign.pub
{{- else if eq .chezmoi.os "windows" }}
signingkey = "C:/Users/eleung/.ssh/id_ed25519_github_sign.pub"
{{ end }}