How to set up and use Git

By | December 16, 2014

Say we want to work with a Git repository on a server and we develop locally on our developer machine.
So how do we set up and use Git?

First create a directory on the server where the remote Git repository will be and initialise the remote Git repository

ssh user@server
mkdir -p ~/git/project.git
cd ~/git/project.git
git --bare init

Then exit from the server and cd to your local project directory on your development machine and initialise the local Git repository.

cd ~/project
git init

To be continued…

One thought on “How to set up and use Git

Leave a Reply

Your email address will not be published. Required fields are marked *