I have installed git on the server. There are already plenty of files in the project directory (www/beta/httpdocs). I want to setup a remote bare repository where I and a few people could push to.
We want to connect that repo to a directory in the wwwroot so that when someone pushes their files to the repo, the files are automatically copied to the wwwroot of our beta domain (beta.server.com) where we could test for bugs. When we are satisfied with the quality, I would copy the files to the main domain (which is on the same server, just in another directory) manually, or if I find another more profound way.
It’s very important that I somehow add these already existing files on the server to the bare repo.
first, to add the current files,
git initthen setup a remote branch to push to. Then on your server setup a post-receive hook that runs a deploy off to your service, basically triggering agit pull