-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_gitconfig.tmpl
More file actions
87 lines (80 loc) · 1.9 KB
/
dot_gitconfig.tmpl
File metadata and controls
87 lines (80 loc) · 1.9 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
# ~/.gitconfig
# zoug
#
# git configuration and aliases
#
[user]
email = {{ .git_email }}
name = Yassine Zouggari
signingkey = {{ .ssh_private_key_filepath }}.pub
[alias]
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
adog = log --graph --oneline --decorate --all
fl = log -u # file log
lf = diff-tree --no-commit-id --name-status -r # list files
d = diff
dc = diff --cached
dlc = diff --cached HEAD^ # diff last commit
rs = restore --staged
conflict = diff --name-only --diff-filter=U
co = checkout
ci = commit
br = branch
st = status
bl = blame
[init]
defaultBranch = main
# automatically use SSH for github repos
[url "ssh://git@github.com/"]
insteadOf = https://github.com/
[gpg]
format = ssh
[commit]
gpgsign = true
# the following was taken from this great article:
# https://blog.gitbutler.com/how-git-core-devs-configure-git/
# clearly makes git better
[column]
ui = auto
[branch]
sort = -committerdate
[tag]
sort = version:refname
[diff]
algorithm = histogram
colorMoved = plain
mnemonicPrefix = true
renames = true
[push]
autoSetupRemote = true
default = simple
followTags = true
[fetch]
prune = true
pruneTags = true
all = true
# why the hell not?
[help]
autocorrect = prompt
[commit]
verbose = true
[rerere]
enabled = true
autoupdate = true
[core]
excludesfile = ~/.gitignore
[rebase]
autoSquash = true
autoStash = true
updateRefs = true
# a matter of taste (uncomment if you dare)
[core]
# fsmonitor = true
# untrackedCache = true
[merge]
# (just 'diff3' if git version < 2.3)
conflictstyle = zdiff3
[pull]
rebase = true