summary refs log tree commit diff
path: root/dot_gitconfig.tmpl
blob: b65f2ffddcec51da7d1c60cf9e0781ee137cc309 (plain)
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
[user]
    email = {{ .git.email }}
    name = {{ .git.name }}

[core]
    autocrlf = {{ if eq .chezmoi.os "windows" -}} true
               {{- else -}}                       input
               {{- end }}
    excludesFile = ~/.gitignore_global
    pager = {{ .git.pager }}
    whitespace = trailing-space,space-before-tab

[credential]
    helper = {{ if eq .chezmoi.os "darwin" -}}        osxkeychain
             {{- else if eq .chezmoi.os "windows" -}} manager
             {{- else -}}                             store
             {{- end }}

[init]
    templatedir = ~/.gittemplates
    defaultBranch = main

[pull]
    ff = only

[push]
     default = current

[apply]
    whitespace = fix

[commit]
    verbose = true
    template = ~/.gittemplates/commit

[status]
    showUntrackedFiles = all

[log]
    decorate = full

[interactive]
    diffFilter = {{ if eq .git.pager "delta" -}} delta --color-only --features=interactive
                 {{- else -}}                    less --use-color
                 {{- end }}

[grep]
    extendedRegexp = true
    lineNumber = true

[merge]
    conflictstyle = diff3

[diff]
    colorMoved = default
    renames = copies
    mnemonicprefix = true

[filter "lfs"]
     clean = git-lfs clean -- %f
     smudge = git-lfs smudge -- %f
     process = git-lfs filter-process
     required = true

[lfs]
     concurrenttransfers = 32

[rerere]
    enabled = true

[alias]
    lg  = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) %C(green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' --all
    lgs = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) %C(green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)%n' --all --stat
    lgl = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) %C(cyan)%aD%C(reset) %C(green)(%ar)%C(reset)%C(auto)%d%C(reset)%n%C(white)%s%C(reset) %C(dim white)- %an%C(reset)%n' --all --stat

    a = add
    aa = add --all

    c = commit -v
    cv = commit -v
    ca = commit -v --amend

    cl = clean -id
    prc = !"git reset --hard && git clean -dffx"

    d = diff
    dt = diff-tree --no-commit-id --name-only -r

    fa = fetch --all --prune
    fo = fetch origin

    l = pull

    p = push
    pf = push --force-with-lease
    pff = push --force

    r = rebase
    ri = rebase --interactive

    sb = status -sb
    ss = status -s

    co = checkout

[delta]
    navigate = true
    features = decorations
[delta "interactive"]
    keep-plus-minus-markers = false
[delta "decorations"]
    line-numbers = true
    commit-decoration-style = bold yellow box ul
    # commit-style = raw
    file-style = ul yellow
    file-decoration-style = none
    hunk-header-decoration-style = blue box ul
    hunk-header-file-style = brightyellow
    hunk-header-line-number-style = green
    hunk-header-style = file line-number syntax
    navigate = true