For me the issue was Sourcetree. It sets the following value in ~/.gitconfig
[safe]
bareRepository = explicit
Removing those two lines of code fixed the issue for me.
As of 10/31/2024 it looks like there is a bug filed with Atlassian for this issue: https://jira.atlassian.com/browse/SRCTREE-8176