Files
dotfiles/.gitconfig##template
Ted Kulp 6b34237bae refactor(git): improve branch parsing logic
Refactor the logic used to determine local branches considered
'gone' in custom Git commands. Ensure proper handling of branches
that are checked out in worktrees.
2025-01-03 10:32:28 -05:00

69 lines
1.6 KiB
Plaintext

[user]
name = Ted Kulp
{% if yadm.hostname == "ALLOCATE-Y3HW9MWW2D" %}
email = ted@allocate.co
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFsv4Cz+g1q93ifvEhSyMgE6mWiKacoLRKyHgWC7Vey7
{% else %}
email = ted@tedkulp.com
gmail = tedkulp@gmail.com
signingKey = AE6B007E2FAB1C94319C7C09FD56BE79CDAE7895
{% endif %}
{% if yadm.hostname == "ALLOCATE-Y3HW9MWW2D" %}
[core]
commentChar = @
pager = delta
[gpg]
format = ssh
[gpg "ssh"]
program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"
allowedSignersFile = /Users/tedkulp/.ssh/allowed_signers
{% else %}
[core]
pager = delta
{% endif %}
[commit]
gpgsign = true
[credential]
helper = osxkeychain
[pull]
rebase = false
[tag]
forceSignAnnotated = true
[alias]
mdr = merge --no-commit --no-ff
mom = merge --no-edit origin/main
moma = merge --no-edit origin/master
dlb = "dead-local-branches"
ddlb = "delete-dead-local-branches"
fdlb = "force-delete-dead-local-branches"
dead-local-branches = "!git branch -vv | grep ': gone]'| grep -v '\\*' | awk '{ if ($1 == \"+\") print $2; else print $1; }'"
delete-dead-local-branches = "!git branch -vv | grep ': gone]'| grep -v '\\*' | awk '{ if ($1 == \"+\") print $2; else print $1; }' | xargs -r git branch -d"
force-delete-dead-local-branches = "!git branch -vv | grep ': gone]'| grep -v '\\*' | awk '{ if ($1 == \"+\") print $2; else print $1; }' | xargs -r git branch -D"
[init]
defaultBranch = main
[push]
autoSetupRemote = true
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true
dark = true
[merge]
conflictstyle = diff3
[diff]
colorMoved = default