-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_gitconfig.tmpl
More file actions
61 lines (52 loc) · 1.4 KB
/
dot_gitconfig.tmpl
File metadata and controls
61 lines (52 loc) · 1.4 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
[include]
path = ~/.config/gitalias/gitalias.txt
[user]
name = {{ .name | quote }}
email = {{ .email | quote }}
[core]
editor = {{ .editor | quote }}
excludesfile = ~/.gitignore
checkStat = minimal
[init]
defaultBranch = main
[alias]
# Common typos.
ull = pull
ush = push
upll = pull
pulll = pull
checkotu = checkout
pul = pull
psh = push
lgo = log
# Difftastic aliases, so `git dlog` is `git log` with difftastic and so on.
dlog = -c diff.external=difft log --ext-diff
dshow = -c diff.external=difft show --ext-diff
ddiff = -c diff.external=difft diff
fixup = "!git_fixup"
blame-link = "!git_blame_link"
work = "!f() { \
if [ $# -ne 1 ]; then \
echo 'Usage: git work <branch-name>' >&2; \
return 1; \
fi; \
git worktree add \"$WORKSPACE_DIR/${1##*/}\" -b \"$1\"; \
}; f"
[url "git@github.com:"]
insteadOf = https://github.com/
[difftool]
# Run the difftool immediately, don't ask 'are you sure' each time.
prompt = false
[pager]
# Use a pager if the difftool output is larger than one screenful,
# consistent with the behaviour of `git diff`.
difftool = true
[diff]
# Set difftastic as the default difftool, so we don't need to specify
# `-t difftastic` every time.
tool = difftastic
external = difft
# {{- if joinPath .chezmoi.homeDir ".gitconfig.local" | lstat }}
[include]
path = {{ joinPath .chezmoi.homeDir ".gitconfig.local" }}
# {{- end }}