summary refs log tree commit diff
path: root/dot_gitconfig.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'dot_gitconfig.tmpl')
-rw-r--r--dot_gitconfig.tmpl121
1 files changed, 121 insertions, 0 deletions
diff --git a/dot_gitconfig.tmpl b/dot_gitconfig.tmpl
new file mode 100644
index 0000000..b65f2ff
--- /dev/null
+++ b/dot_gitconfig.tmpl
@@ -0,0 +1,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