forked from benmezger/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_gitconfig.tmpl
More file actions
122 lines (122 loc) · 3.8 KB
/
dot_gitconfig.tmpl
File metadata and controls
122 lines (122 loc) · 3.8 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
[user]
name = {{ .name }}
email = {{ .email }}
signingkey = {{ .gpg_keyid }}
[core]
excludesfile = ~/.gitignore_global
editor = ~/.bin/editor
whitespace = trailing-space,space-before-tab
pager = delta
[filter "media"]
required = true
clean = git media clean %f
smudge = git media smudge %f
[push]
default = current
followTags = true
[alias]
unadd = reset HEAD
undo-commit = reset --soft HEAD^
ec = config --global -e # edit gitconfig
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate # List commits in short form, with colors and branch/tag annotations.
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat # List commits showing changed files
lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short # List oneline commits showing dates
ld = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative # List oneline commits showing relative dates
le = log --oneline --decorate #Default look for short git log
logtree = "log --graph --oneline --decorate --all" # same as above, but with graph
filelog = log -u # See all the commits related to a file, with the diff of the changes with git log -u
dl = "!git ll -1" # Show modified files in last commit
dlc = diff --cached HEAD^ # Show a diff last commit
dr = "!f() { git diff "$1"^.."$1"; }; f" # Show content (full diff) of a commit given a revision
lc = "!f() { git ll "$1"^.."$1"; }; f" # ^
diffr = "!f() { git diff "$1"^.."$1"; }; f" # ^
la = "!git config -l | grep alias | cut -c 7-" # List all your Aliases
permission-reset = !git diff -p -R | grep -E \"^(diff|(old|new) mode)\" | git apply
co = checkout
br = branch
ci = commit
st = status
last = log -1 HEAD
web = instaweb --httpd=webrick
webstop = instaweb --httpd=webrick --stop
permission-reset = !git diff -p -R | grep -E \"^(diff|(old|new) mode)\" | git apply
dsf = "!f() { [ \"$GIT_PREFIX\" != \"\" ] && cd "$GIT_PREFIX"; git diff --color $@ | diff-so-fancy | less --tabs=4 -RFX; }; f"
git = !exec git
pushall = !git remote | xargs -L1 git push --all
[filter "gitignore"]
clean = "sed '/#gitignore$/'d"
smudge = cat
[grep]
extendRegexp = true
lineNumber = true
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[stash]
showPatch = true
[log]
decorate = full
[merge]
conflictstyle = diff3
stat = true
[status]
showUntrackedFiles = all
[commit]
verbose = true
template = ~/.gittemplates/commit
[advice]
pushNonFastForward = false
statusHints = false
[diff]
renames = copies
mnemonicprefix = true
[diff "hex"]
textconv = hexdump -v -C
binary = true
[diff "zip"]
textconv = unzip -v
[diff "pdf"]
textconv = mdls
[diff "bin"]
textconv = hexdump -v -C
[github]
user = {{ .github_user }}
[gitlab]
user = seds
[flake8]
strict = true
[filter "lfs"]
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
[init]
templatedir = ~/.gittemplates
defaultBranch = main
[merge "ours"]
driver = true
[remote "origin"]
prune = true
[pull]
rebase = true
[delta]
features = unobtrusive-line-numbers decorations
line-numbers = true
navigate = true
side-by-side = true
conflictStyle = zdiff3
dark = true
syntax-theme = gruvbox-dark
[interactive]
diffFilter = delta --color-only
[rerere]
enabled = 1
{{- if eq .chezmoi.os "darwin" }}
[credential]
helper = osxkeychain
{{- else }}
[credential]
helper = /usr/lib/git-core/git-credential-libsecret
{{ end -}}