- If you haven't already, install git on the server by running:
sudo apt-get install git
- If you haven't already, create a repo directory inside of /var by running
sudo mkdir repo
- On the live server, go into /var/repo and create a new directory inside eg newsite.git
- The new directory path should look like /var/repo/newsite.git
- Ensure a new directory has been created in the www directory. Eg /var/www/newsite
- cd into /var/repo/newsite.git and run:
sudo git init --bare
--bare means that our folder will have no source files, just the version control.
A number of new folders will be created, cd into the hooks directory