-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_gitconfig.tmpl.example
More file actions
87 lines (66 loc) · 1.49 KB
/
dot_gitconfig.tmpl.example
File metadata and controls
87 lines (66 loc) · 1.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
[user]
name = {{ .name | quote }}
email = {{ .email | quote }}
[init]
defaultBranch = main
[core]
editor = nvim
pager = delta
excludesfile = ~/.gitignore_global
autocrlf = input
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true
light = false
side-by-side = true
line-numbers = true
[merge]
conflictstyle = diff3
[diff]
colorMoved = default
[pull]
rebase = true
[push]
autoSetupRemote = true
default = current
[fetch]
prune = true
[rebase]
autoStash = true
[alias]
# Status
s = status -sb
# Logging
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
ll = log --oneline -n 20
# Branching
co = checkout
cob = checkout -b
br = branch
bra = branch -a
# Committing
cm = commit -m
ca = commit --amend
can = commit --amend --no-edit
# Diffing
d = diff
ds = diff --staged
# Stashing
st = stash
stp = stash pop
stl = stash list
# Undo
undo = reset HEAD~1 --mixed
unstage = reset HEAD --
# Cleanup
cleanup = "!git branch --merged | grep -v '\\*\\|main\\|master' | xargs -n 1 git branch -d"
[credential]
helper = osxkeychain
{{ if eq .machine_type "work" }}
# Work-specific git config
[url "git@github.com:"]
insteadOf = https://github.com/
{{ end }}
[github]
user = {{ .github_username | quote }}