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.