I have a repository with a detached worktree. Normally if I need to work on the repo, I can change the config file as follows and use commands like git status and git checkout:
[core]
repositoryformatversion = 0
filemode = true
bare = false
worktree = /var/www/mysite.net/httpd/
# TO PUSH REPO TO STAGE: change bare=false and uncomment the worktree
Now though, I’m getting the error fatal: This operation must be run in a work tree. I’ve got a bunch of sites set up this way so I’m sure I have just forgotten something, but I can’t figure out what. Can anyone think of what would cause this?
Dumb mistake. That worktree should have been to a .com instead of a .net.
So I guess my answer is the usual one – double check your spelling.