Git is de facto when it comes to source control systems. I have used many source control systems over the years and git is by far the easiest to setup, well supported and documented and best of all its open source. github has definitely contributed to the success of Git. Once you sign up the easiest way to create your new Project is to use the github web interface. On the main page of your github account just click the “New repository” button:
For this example, I decided to create a project based on the exercises I am working on in The Definitive Guide to Django: Web Development Done Right. This way it doesn’t matter what computer I am working on. As long as I have git installed (and an internet connection) , I can simply clone or pull the latest copy of my work in progress.
After you click “New repository” you will get a simple web form that looks like this:
Repository name and Description are straightforward and more than likely you will be creating a Public project. The most important option is the “Initialize the Repository with a README”. Make sure you check this and if you read the note below the checkbox you will quickly understand why this simplifies the process of creating a new project. Fill out the form and click “Create repository”:
You have just created a Public Git Project. Now you can “clone” the project on your computer or development server with one simple command:
Because we cloned the project, “origin” has already been set up. If you want to “push” your changes to github simply execute:
#git push –u origin master
This approach only works if you haven’t started development on you local machine or you don’t want to copy the files over to the newly cloned project.