Unable to rebuild discourse

Sorry, I don’t know. Do you have a .git subdirectory? What is in it?

In my case, the config file looks like this:

# cat .git/config 
[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
[remote "origin"]
	url = https://github.com/discourse/discourse_docker.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
	remote = origin
	merge = refs/heads/main

But this is for reference. I don’t think the fix is to edit a config file!