RoboDOJO

Git and GitHub Introduction

Introduction

When working on a software project with a team of programmers, it is important to keep track of changes to the source code. This is important for several reasons.

First, tracking changes allows for some changes to be rolled back to the previous version in cases where the changes were a mistake.

Second, it allows multiple programmers to work on the same section of code without one programmer's changes getting overwritten by another programmer's changes.

The process of tracking changes to source code is called Source Code Management. Over the decades, software that performs Source Code Management, SCM, has gotten better and better, adding features and support to make source code management easier and easier.

Git

Git is such a software package. It handles source code management by storing all the source code and related files on a server. Each programmer has their own local copies of the source code on their computer. When the programmer has made a complete set of changes and tested those changes, the new and modified files are sent to the server. Programmers periodically, pick up the changes in the remote server and merge them with their local copy.

Git is used through the use of a CLI, Command Line Interface, called git. The git CLI run from a command prompt:

>git status

There are also other user interfaces for git available from third-parties. VSCode, the editor used by FRC programmers has builtin git functionality.

For more information, see Git Homepage

GitHub

A git server is necessary to use git. It is possible to run your own git server. For small groups, this is usually impractical due to cost and requires a computer that every member of the project team can access over the Internet.

There are several companies that provide git servers. The one that the SCAROBprogram memory pay a fee. Therefore, SCAROB uses this git server for free.

GitHub requires every programmer to have a GitHub Account. These accounts are free and allow.

Signup for a free github account at: GitHub

Online Tutorials and References

The following is a sample of tutorials and references for Git and GitHub that can be found by simply googling:

git - distributed version control system - Homepage

Git Reference Documentation for the Git Homepage.

What is Git? - Microsoft

About GitHub and Git

Video: GitHub Basics Made Easy : A Fast Beginner's Tutorial

Video: Git and GitHub Tutorial for Beginners