It seems like the central git repo I'm working with is both non-bare and has no working tree, which doesn't seem possible given my understanding of the definition of non-bare.
In the repository the result of git rev-parse --is-bare-repository
is false
And when I look at its branch list the master branch is shown as checked-out with an asterisk.
However when I try to checkout a different branch I am met with:
fatal: This operation must be run in a work tree
I discovered this when I tried to push my changes from my local repo and got:
! [remote rejected] master -> master (branch is currently checked out)
Could someone help me understand the situation more? Ideally I would want the central repo to be bare and to be able to push there.
For context, I did not create the repo myself so I'm not sure if this is purposeful or happened by accident somehow.
Edit: For more info, here is the content of the config file
[core]
repositoryformatversion = 0
filemode = true
bare = false
[receive]
denyCurrentBranch = refuse