Simple git setup and remote transfer

First we want to initialize a new repository on our local machine and then commit the source.

After that we create a so called bare repository to be able to copy it to our server.

Let’s make a tarball and compress it. After that we upload it onto our server with the scp command.

Then we log on to our server and untar our package:

Now our repository is located on the server — ready to reference it now.

Back to our local machine we are going to tell git that the repository is now a remote one:

Et voilĂ . Now you can submit your changes to the remote repository via git push.

Another advantage of this is that you can do your deployment with an easy git pull on your remote server.