Git & GitHub Course
Git & GitHub
/
Beginner

Version Control Systems

Definition

A system that records changes to a file or set of files over time so that you can recall specific versions later.

Explain Like I'm New

A time machine for your files. A Version Control System (VCS) allows you to revert files back to a previous state, revert the entire project back to a previous state, compare changes over time, see who last modified something that might be causing a problem, and more.

Real World Example

Google Docs version history. You can open a document, click 'Version history', and see every edit made by every person over the last year, and restore any of them.

Common Use Cases

  • •Backup and Restore
  • •Auditing (Blaming)
  • •Synchronization

Terminal Output

bash / terminal
// Example of Centralized vs Distributed const svn = 'Centralized: 1 Server has history. Clients just have 1 file.'; const git = 'Distributed: 1 Server has history. EVERY Client has the FULL history too!'; console.log(git);

Interview Questions

basic

  • What are the two main types of Version Control Systems?

intermediate

  • Why is Centralized Version Control considered risky?

Flash Cards

Question

Two main types?

Click to reveal answer
Answer

Centralized (like Subversion/SVN) and Distributed (like Git).

Question

Why risky?

Click to reveal answer
Answer

If the central server goes down, nobody can collaborate or save versioned changes. If the central server's hard drive crashes and there are no backups, the entire history of the project is lost.