Lecture notes
Version control and Git
Functions of version control
- Saves versions
- Assigns unique names to each version
- Maintains the relations between the various versions
- 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.