The one-line summary: push into a remote repository that has a detached work tree, and a post-receive hook that runs “git checkout -f”.
post-receive
git checkout -f