Sackville-West Clan Wiki/ tech/ Creating a new git repo

These are my basic instructions for creating a new git repo. I don't do this very often, and so can never quite remember the process...

Assuming I'm logged in to the web server, become the www-data user for convenience:

sudo su www-data #www-data doesn't have a password, so sudo is needed, or I could su root first...

cd /var/cache/git
mkdir new_repo.git
cd new_repo.git
git init --bare
touch git-daemone-export-ok
echo "some basic description" > README.html
git update-server-info

and that's pretty much it on the server.

On the local machine, do

git clone # git is not real happy with this, but it'll work...

... hack hack hack ...

git push remotes/origin master

This seems to be the magic sauce. enjoy.