-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot.gitconfig
More file actions
61 lines (61 loc) · 2.13 KB
/
dot.gitconfig
File metadata and controls
61 lines (61 loc) · 2.13 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
# inspired by:
# - https://thoughtbot.com/blog/git-push-force-with-lease
# - https://thoughtbot.com/blog/autosquashing-git-commits
# - https://jvns.ca/blog/2024/02/16/popular-git-config-options/
# - https://ductile.systems/zdiff3/
# - https://luppeng.wordpress.com/2020/10/10/when-to-use-each-of-the-git-diff-algorithms/
# - https://www.youtube.com/watch?v=CAnQ4b0uais
# - https://www.youtube.com/watch?v=DZI0Zl-1JqQ (You Don’t Know Git - Edward Thomson)
# - and many other places/talks/people/etc.
[user]
name = Sergey Kuznetsov
email = kuznecov.sg@gmail.com
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO04XojxNytNXJ5pBJPsbwreDevoGe6BuAgWfu1gkimQ kuznecov.sg@gmail.com
[alias]
st = status -s # much shorter version of the status command output, use `git status` to get the full output
co = checkout
aa = add . --all
pf = push --force-with-lease # safe 'force push'
pr = pull --rebase # GitHub PR? Not really...
lol = log --oneline --decorate
graph = log --oneline --graph --decorate
wdiff = diff --word-diff # highlight changed words (instead of lines)
staash = stash --include-untracked
blaame = blame -w -C -C -C # ignore whitespaces and moved lines of code
[core]
excludesfile = ~/.gitignore
[init]
defaultBranch = master
[branch]
sort = -committerdate
[commit]
gpgsign = true
verbose = true # include a diff when writing a commit message
[gpg]
format = ssh
[merge]
conflictstyle = zdiff3 # show original code in the middle
[diff]
algorithm = histogram
[fetch]
prune = true # removes any remote-tracking references that no longer exist on the remote
[pull]
ff = only
[push]
default = current # push the local branch to a remote branch with the same name
[rebase]
autosquash = true # cleans "fixup! ..." commits
[rerere]
enabled = true # REuse REcorded REsolution (auto-fix repetative merge conflicts)
[grep]
lineNumber = true
patternType = perl # git grep '[Cc]opyright\s+\d'
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[include]
path = ~/.gitconfig.local
[includeIf "gitdir:~/Workspace/wt/**"]
path = ~/Workspace/wt/.gitconfig