[include]
  path = ~/.local/share/delta/themes.gitconfig
  path = ~/.config/git/local.toml
[advice]
  detachedHead = false
[alias]
  c = commit
  ca = commit -a
  cm = commit -m
  cam = commit -am
  d = diff
  dc = diff --cached
  l = log --graph --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit
  master = !git add --all && git commit -am 'Quick commit.' -n && git push origin master
  sub  = submodule update --init --recursive
  # Find commits by source code.
  cc = "!f() { \
    git log --pretty=custom --decorate --date=short -S\"$1\"; \
  }; f"
  # Find commits by commit message.
  cm = "!f() { \
    git log --pretty=custom --decorate --date=short --grep=\"$1\"; \
  }; f"
  # Credit an author on the latest commit.
  credit = "!f() { \
    if [ -n \"$1\" ] && [ -n \"$2\" ]; then \
      git commit --amend --author \"$1 <$2>\" -C HEAD; \
    fi \
  }; f"
[color]
  diff = auto
  status = auto
  branch = auto
  interactive = auto
  ui = true
  pager = true
[color "branch"]
  current = yellow reverse
  local = yellow
  remote = green
[color "diff"]
  meta = yellow bold
  frag = magenta bold
  old = red bold
  new = green bold
[color "status"]
  added = yellow
  changed = green
  untracked = cyan
[commit]
  template = ~/.config/git/commit-template
[core]
  editor = vi
  excludesfile = ~/.config/git/ignore
  autocrlf = input
  attributesfile = ~/.config/git/attributes
  editor = code --wait
  eol = lf
  fileMode = false
  pager = delta -w ${FZF_PREVIEW_COLUMNS:-$COLUMNS}
  safecrlf = warn
  whitespace = trailing-space,space-before-tab
[credential]
  helper = cache --timeout=3600
[credential "https://github.com"]
	helper = !gh auth git-credential
[credential "https://gist.github.com"]
	helper = !gh auth git-credential
[delta]
  decorations = true
  features = side-by-side decorations hyperlinks interactive navigate unobtrusive-line-numbers woolly-mammoth zebra-dark
  hyperlinks = true
  interactive = true
  map-styles = bold purple => syntax magenta, bold cyan => syntax blue
  navigate = true
  side-by-side = true
  unobtrusive-line-numbers = true
  plus-style = syntax "#003800"
  minus-style = syntax "#3f0001"
[delta "interactive"]
  keep-plus-minus-markers = false
[delta "decorations"]
  commit-decoration-style = blue ol
  commit-style = raw
  file-style = omit
  hunk-header-decoration-style = blue box
  hunk-header-file-style = red
  hunk-header-line-number-style = "#067a00"
  hunk-header-style = file line-number syntax
[delta "line-numbers"]
  line-numbers-left-style = cyan
  line-numbers-right-style = cyan
  line-numbers-minus-style = 124
  line-numbers-plus-style = 28
[diff]
  colorMoved = default
  ignoresubmodules = dirty
  renamelimit = 0
  mnemonicprefix = true
  renames = copies
[diff "bin"]
  textconv = hexdump -v -C
[diff "image"]
  command = compare $2 $1 png:- | montage -geometry +4+4 $2 - $1 png:- | display -title \"$1\" -
[difftool]
  prompt = false
[fetch]
  prune = true
[help]
  autocorrect = 20
[init]
  defaultBranch = master
  templatedir = ~/.config/git/template
[interactive]
  diffFilter = delta --color-only --features=interactive
[merge]
  conflictstyle = diff3
  ff = only
  renamelimit = 0
  summary = true
  stat = true
  tool = vscode
[mergetool "vscode"]
  cmd = code --wait $MERGED
[pack]
  threads = 0
[pretty]
  custom = "%C(magenta)%h%C(red)%d %C(yellow)%ar %C(green)%s %C(yellow)(%an)"
[push]
  autoSetupRemote = true
  default = upstream
  followTags = true
[rebase]
  autosquash = true
[rerere]
  enabled = true
  autoupdate = true
[sendemail]
  smtpserver = smtp.gmail.com
  smtpuser = {{ default "" .user.gmail.username }}
  smtpencryption = tls
  smtpserverport = 587
  smtpPass = {{ default "" (env "GMAIL_PASSWORD") }}
[status]
  showUntrackedFiles = all
  submoduleSummary = true
[transfer]
  fsckobjects = true
[url "https://"]
  insteadOf = git://
[user]
  email = {{ .user.email }}
  name = {{ .user.name }}
[web]
  browser = google-chrome