Lecture notes

Version control and Git

Functions of version control

  1. Saves versions
  2. Assigns unique names to each version
  3. Maintains the relations between the various versions
  4. Keeps track of the current version pointer

Most common actions in version control

  • Commit / Checkin β†’ Current version gets updated with the changes
  • Dropping a version / Reverting back β†’ move the current version back to a previous commit
  • Master/Main branch β†’ β€œOfficial” version
  • Repository β†’ Structured library of a version control mechanism (local or online)
  • Checking out β†’ Retrieving a read-only copy of the code
  • Merge β†’
  • Conflict β†’ Issues in merging commits. Often have to be handled manually
  • Staging environment β†’ included changes to be committed

How version control works

  • Individual file versions are independent, but the current version pointer keeps the current version of each file in sync.

Lecture slides