Overview

Version control is a vital tool when working with a team on software. While there are several different tools that support version control, Git is the most popular and widely used today. Today we’ll focus on learning the most important functionalities of Git.

Basic Learning Objectives

Before class, you should be able to:

  • Explain what a code repository is and why we use code repositories.
  • Explain the basic git workflow, so that you are ready to complete the git lab.
  • Identify the circumstances which lead to merge conflicts
  • Explain the basic strategies to resolve merge conflicts when they arise

Advanced Learning Objectives

After class, you should be able to:

  • Add, change, and remove files from a git repository
  • Create and resolve merge conflicts in your own and team git repositories
  • Work with branches and merge branches
  • Have your team repository setup

Readings

To achieve the basic learning objectives, you should read the following before class:

Checks

Write answers to the following and bring them to class:

  1. What is git? What is its purpose?
  2. What is the difference between git and GitHub?
  3. What is a repository?
  4. What is the difference between a stage and a working directory?
  5. What is the typical git workflow, from start to finish, when you want to add or modify a file in a repository and make sure the changes are on GitHub?
  6. What is a merge conflict?
  7. Describe a situation in which a merge conflict might occur.
  8. What are the markers in a file that indicate where the conflict is?
  9. Describe the workflow you would use to resolve a merge conflict (i.e. what sequence of git commands would you use?).