I want to use git to manage some data on a remote server, so I set up a non-bare repository there. I can push to it without problems, and the repository its
This, happily, is now supported directly in git itself! You can find the details in this answer, which I have just upvoted:
https://stackoverflow.com/a/38363683/85360
It recommends configuring the remote with
git config receive.denyCurrentBranch updateInstead
so that pushes result in an updated working copy!