What OS is your server? It's a lot easier with a linux server.
You can do it as follows (presuming you already have ssh access). I shall call your server sally, and your desktop dan, for convenience.
Connect to your server from your desktop:
ssh sally
then on the server, create somewhere to keep your repos:
mkdir -p /var/git
cd /var/git
Now you have somewhere to keep stuff. Next we will presume you already have a git repo for your project called 'project1.git' on your desktop. You can do the following for each new project:
Still on the server
mkdir project1.git
cd project1.git
git --bare init #use bare as you don't need the files checked out on the server
touch git-daemon-export-ok #for later if you set up the git daemon (optional)
Then back on the desktop, push your changes to the new repo on the server:
git remote add origin sally:/var/git/project1.git
git push origin master
That's it. You can then clone from another machine with
git clone sally:/var/git/project1.git project1.git
Optional extras:
- Set up the [git daemon][2], to share without needing ssh access.
- Set up [gitweb][3] to get a nice web interface
2 - http: //www.kernel.org/pub/software/scm/git/docs/git-daemon.html
3 - http: //git.or.cz/gitwiki/Gitweb