Skip to content

Git and Source Control

Before doing anything, go install Git!

Git Learn might be the best resource for diving into Git.

A repository is like a folder. It stores things and even has a name. The difference between the two is that repositories allow for something we call Version/Source Control.

Version control is a feature that describes our ability to keep track of our changes, like version history on Google Docs.

To create a repository, open command prompt. Using cd and/or mkdir (you can search how to use these), navigate to the folder where you want to make your repository.

Once you’re there, run git init.

Run git add . if there are already files in the folder that you want to include. This is called staging.

Run git commit -m "some message here", and you’re done! You’ve got a fully-functional repository.

To edit the files, open the folder in an IDE (Integrated Development Environment). For robotics, we usually use WPILib’s version of VS Code (Visual Studio Code) that comes with installing the latest release.

If you’re feeling crazy, you can always use a text-editor like notepad or MS Word too. I wouldn’t recommend it, but it’s possible.

In VS Code, a sidebar tab labeled Source Control visualizes everything we just discussed, making your repository a lot easier to manage.


The way your repository keeps track of your history is by making a timeline. Entries on this timeline are called commits.