What is Git?

Introduction to Git and GitHub

The DE Africa Sandbox can be used with the version control software Git. Git is free and open-source, and is an industry standard for maintaining code bases used by multiple users. It keeps track of:

  • Files

  • Changes to file contents

  • Who added the changes

  • Who approved the changes

  • When these changes were made

It also allows files to be copied, so changes can be made away from the original files, and has rollback features to remove unwanted changes.

One of the Git service providers is a website called GitHub. GitHub allows Git users to better manage their files and projects.

The DE Africa Analysis Sandbox has integrated compatibility with Git and GitHub. Connecting your Sandbox to Git via a GitHub account is an excellent way of accessing the DE Africa analysis code, which uses Python in Jupyter Notebooks. It allows you to make your own changes and develop new analyses, without affecting existing code. It is also important for collaboration, as you can publish your changes so they can be viewed, reviewed, and edited by your co-workers.

Why should I use it?

Benefits of using Git:

  • Become familiar with a free version control software used worldwide

  • Experiment with DE Africa code without worrying about breaking it

  • Back up your DE Africa analysis work to GitHub

  • Easily share your code via its GitHub URL

  • Gain basic command-line interface experience

Git concepts

In each section of this guide on Git, new Git terminology will be introduced in a section called Git concepts.

  • Repository: Often shortened to ‘repo’. A Git repository is like a folder that lives on GitHub. It contains all the files related to your project. For example, all of the DE Africa Sandbox documentation has been added to a repository called deafrica-docs. Even if you don’t have a GitHub account, you can view the files on the repo’s GitHub website. To edit or suggest contributions to them, you will need to log in to GitHub. You can do this with most public repos.

Create a GitHub account

You will need a GitHub account to access files in GitHub repositories. There is a free account option which is suitable for DE Africa purposes.

Sign up at https://github.com/join.

Click Next to learn how to connect your GitHub account to the DE Africa Sandbox.