[user]
	email = socials@rodneyosodo.com
	name = Rodney Osodo
	signingkey = /home/rodneyosodo/.ssh/github

[core]
  editor = nvim
  pager = delta

[commit]
	gpgsign = true

[gpg]
	format = ssh

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

[push]
  autoSetupRemote = true

[init]
  defaultBranch = main

[interactive]
  diffFilter = delta --color-only --features=interactive

[delta]
  features = decorations

[delta "interactive"]
  keep-plus-minus-markers = false

[delta "decorations"]
  line-numbers = true
  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

# Detect whitespace errors when applying a patch.
[apply]
    whitespace = fix

# Cleanup branches
[alias]
    # Clean up local merged branches (excluding master, develop, dev, and release* branches)
    cleanup-local = "!git branch --merged | grep -v '\\*\\|master\\|main\\|develop\\|dev\\|release' | xargs -n 1 -r git branch -d"

    # Clean up remote merged branches (excluding master, develop, dev, and release* branches)
    cleanup-remote = "!git fetch -p && git branch -r --merged | grep -v '\\*\\|master\\|main\\|develop\\|dev\\|release' | sed 's/origin\\///' | xargs -n 1 -r git push origin --delete"

[url "git@bitbucket.org:"]
	insteadOf = https://bitbucket.org/

[url "ssh://git@github.com/"]
	insteadOf = https://github.com/

[gitbutler]
	gitbutlerCommitter = 0
	aiOpenAIKeyOption = bringYourOwn

[credential "https://github.com"]
	helper =
	helper = !/usr/bin/gh auth git-credential

[credential "https://gist.github.com"]
	helper =
	helper = !/usr/bin/gh auth git-credential
