First, you will need to setup a development server. You can read and follow this tutorial to setup a debian-based server. To recap, you need at a minimum to setup a password-less login to your server.
Create a user in your server where you will login to and store your project code.
$ adduser projectuser
Create ssh key pair in your desktop if you don't have any.
Upload your key to your server:
$ ssh-copy-id projectuser@server-ip-address
Install git on both your server and desktop:
$ apt-get install git-core
Now you can create and setup your project at the remote server:
$ pwd /home/projectuser $ mkdir awesome-project $ cd awesome-project $ git init $ echo "Hello World" > readme.txt $ git add . $ git commit -a -m "Initial Commit"
And you can now clone the project in your desktop:
$ git clone ssh://projectuser@server-ip-address/home/projectuser/awesome-projectIf you want a ready made solution without spending money, you can check-out bitbucket. The service is free for unlimited number of projects, for a team of maximum 5 members.