I want to deploy git for my organisation. I want users to have no access to the server and to make commits only to the repository.
However I want the repository to be a real file system that I can use with an apache virtual host.
What I have done is the following:
cd /home/vhosts
git init --shared {projectname}
git config receive.denyCurrentBranch ignore
I then want to run git reset --hard after every push back to the main repository.
Is this a good idea? Should I have a second repository that does a git pull instead of a git reset --hard… which is heavier? Can I set this up to be a hook??
Thanks.
I have the setup you describe with a few modifications. Joe Maller has an excellent write-up that I used as a base for my configuration. A web-focused Git workflow