Create a remote repository for publishing

Best is to create a bare repo on the publishing server, work on your favourite computer, and push your changes when you're happy with it.

On the remote side:

 cd /path
 mkdir myproject.git
 cd myproject.git
 git init --bare
 chmod a+x hooks/post-update
 sed -i 's/git-update-server-info/git update-server-info/' hooks/post-update
 ...edit the 'description' file (public description of the project)

On the workstation side:

 cd /otherpath
 mkdir myproject
 cd myproject
 git init
 git remote add origin ssh://myserver.tld/path/myproject
 ...add stuff...
 ...add a '.gitignore' file if necessary...
 git add .
 git commit -m "Initial release"
 git push --all

GitTips (last edited 2010-03-10 15:35:28 by TheDuck)