Welcome!

Who This Guide Is For

If you are someone who is familiar with a Unix-like terminal environment and wants to learn Git basics, then this guide is for you. If you are a CMU student who has taken 15-110 Principles of Computing or 15-122 Principles of Imperative Computation, then you have worked in a Unix-like terminal environment. This guide provides instructions on how to use Git and GitHub, which will help you manage your coding projects as you take more advanced coursework. Knowledge of Git will come in handy if you take 15-213/18-213 Introduction to Computer Systems or any 400+ level systems elective. This guide is not a complete documentation of Git. Rather, this guide is meant for you to develop a working basis for using Git. After following this guide, you will be able to set up Git repositories for your projects, make and save changes, sync your changes with the GitHub server, and analyze the changes across versions.

Why Should I Learn Git

Git is a version control system that allows users to manage a coding project in a distributed manner. Git will allow you to keep track of previous changes to your code. Additionally, Git allows multiple users to collaborate on a coding project. Using Git, you can easily keep track of who made a change, what changes were made, and when someone made changes. The tools that Git provides make it easy for a large team of developers to collaborate.

Git is widely used in the software industry, and many employers will assume knowledge of Git as you enter a software position.

Why GitHub

GitHub is an open-source repository hosting service. It hosts your code and keeps track of the various changes made to every iteration.

We use GitHub for three main reasons:

  • Free Private Repositories: Using your CMU email address (or any address with a .edu suffix) when creating your account will grant you free access to a GitHub Premium account, which allows you to host private repositories.
  • Ease of Collaboration: Hosting the repository online allows members of a team to work on the same code and make changes in an organized manner.
  • Popularity: GitHub is the most popular repository hosting service. Many popular applications, packages, and libraries are hosted on GitHub. So having a GitHub account allows you to copy versions of repositories and contribute to these projects. Even this website is a repository hosted on GitHub, which can be accessed here.

What You Need To Follow This Guide

  1. A Unix-like environment: This guide contains many commands that can be copied directly into Unix-like command lines. MacOS and Linux are both Unix-like environments. A Unix-like environment can be set up in Windows by installing Git Bash, which can be downloaded here.

  2. A GitHub account: A GitHub account is free and will allow you to host unlimited public repositories. It is strongly encouraged that you use your CMU email address to create an account before proceeding with this guide to have access to private repositories as well. Click here to create your account.