Topic 2. Version Control & Branch Management
Version control is perhaps one of the most important topics in software engineering. Version control systems allow teams to collaborate on projects, review one another's code, experiment with new features and ideas, and revert to previous versions when needed. In this unit, we will explore different approaches that teams might take to organize their code repositories. We will also do various hands-on activities so that you can familiarize yourself with bash and git commands.
Tuesday, 9/3
Slides & Activities
- Lecture 4Version Control and Collaborative Workflows
- Activity 1Git Collaboration Activity
Readings
- Read the history section (including all subsections: Naming, Characteristics, Data Structures, and References).
- optional Pro Git bookThe Pro Git book provides some useful context and conceptual models, particularly 2.1-2.5, 3.1-3.1, and 3.6.
Study Questions
- Why is version control important?
- Why is code history important?
- What is the difference between centralized and distributed version control?
- What is the problem with having long-running dev branches? What is the solution?
- What is the one version rule?
- What are the tradeoffs of having a "monorepo" versus multiple repos?
- What is the difference between git and GitHub?
- What is the difference between a merge commit and rebasing? What would you want to do one over the other (i.e., what are the the tradeoffs of each)?
- What does the "origin" typically refer to?
- What is a public / private key pair?
- What do the following git commands do?
clone
,status
,add
,log
,commit
,push
,pull
,merge
,rebase
- What do the following bash commands do?
ls
,cat
,mv
,pwd
,cd
,rm