1 of 15

Version Control Wrap

Fall 2025

1

2 of 15

Outline

  1. Coding exercise
  2. Version Control Review
  3. Time for Lab 3

2

3 of 15

Outline

  1. Coding exercise
  2. Version Control Review
  3. Time for Lab 3

3

4 of 15

5 of 15

Outline

  1. Coding Exercise
  2. Version Control Review
  3. Time for Lab 3

5

6 of 15

Version Control Review

Questions like these will definitely�be on the midterm exam

7 of 15

Syncing Across Different Repos

  • How do you download changes from a remote version of the repository to your local computer?
  • How do you upload changes from your computer to a remote repository?
  • What does the “origin” typically refer to?
    • How do you check the origin?
    • How do you set it?
    • How do you change it?

8 of 15

Branches

  • What is a branch?
  • How do you switch between branches?
  • How do you create a branch
  • How do you delete a branch?

9 of 15

Suppose you have a branch off of main called Feature-Branch, and suppose one commit has been made to main since you branched.

Redraw the history after a merge commit is used to reconcile the history. What branch should you be on to merge into main? What command would you use?

10 of 15

Option 1: Merge Commit

A merge commit creates two parent pointers:

  • One to your updates (X)
  • One to the most recent updates from your collaborator (D)

11 of 15

Suppose you have a branch off of main called Feature-Branch, and suppose one commit has been made to main since you branched.

Redraw the history after a rebase is used to reconcile the history. What branch should you be on to merge into main? What command would you use?

12 of 15

Option 2: Rebasing

Rebasing involves actually making your code history look like you actually branched from D (your collaborator’s commit). In other words, you “rewrite history”. The steps:

  • Re-apply changes to create 3 new commits on top of D
  • Then, fast forward

13 of 15

What is the difference between a fast forward merge and a regular merge?

Your answer here…

14 of 15

What are the steps to resolve a merge conflict during a rebase?

<<<<<<< HEAD

[Feature A Code]

=======

[Feature B Code]

>>>>>>> 1a0ffaa (Add feature b)

  1. git rebase feature-branch (main is the current branch)
  2. Manually resolve the conflicts in main.py
  3. Stage the edited file:�git add main.py
  4. Continue rebasing:�git rebase --continue

main.py

15 of 15

Outline

  1. Coding Exercise
  2. Version Control Review
  3. Time for Lab 3 + Collaborative GitHub exercise

15