-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_gitconfig.tmpl
More file actions
38 lines (38 loc) · 1.65 KB
/
dot_gitconfig.tmpl
File metadata and controls
38 lines (38 loc) · 1.65 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
[init]
defaultBranch = main
[user]
email = {{ .git.email }}
name = {{ .git.name }}
[alias]
l = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%ah%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)'
wc = show --name-status
dels = log --diff-filter=D --name-only --pretty=oneline
adds = log --diff-filter=A --name-only --pretty=oneline
br = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate
s = status -sb
amend = commit --amend --no-edit
unstage = reset HEAD --
pf = push --force-with-lease
ss = "!f() { git stash show -p stash@{${1:-0}}; }; f"
cm = commit -m
ap = add -p
[core]
autocrlf = input # use CRLF endings in Windows checkouts
editor = nvim
[commit]
verbose = true # show diff in commit message editor
[help]
autocorrect = prompt # guesses mistyped command and prompts
[push]
default = simple # pushes current branch to same name on remote
autoSetupRemote = true # sets upstream automatically if unset
followTags = true # push tags upon every push
[diff]
colorMoved = default # show code movement in different colors
mnemonicPrefix = true # replaces diff headers a/ and b/ with i/ (index), w/ (work dir), c/ (commit)
renames = true # detects if a file has been renamed
[branch]
sort = -committerdate # sorts list by most recent commit date
[fetch]
prune = true
pruneTags = true