🎓 A1Learner
🔍
0 of 50 lessons completed

What Is Version Control

Version control is a way to keep every past version of your work. A version is one saved state of a file.

Two saved copies

One file, saved twice. The list shows both copies.

$ ls

What the second copy holds

The second copy adds Eggs. Nothing else moves.

$ cat shopping-v2.txt

Example

$ ls
$ cat shopping-v2.txt

Key points

  • A file changes a little at a time.
  • Each change can help or hurt.
  • Version control saves a copy at each step.
  • You can go back to any saved copy.
  • You can see what changed between two copies.
  • You can compare your work with someone else’s work.
  • Without it, people save copies with names like final-v2-really-final.
  • Those names lie. The history does not.
  • The tool in this course keeps that history for you.

Here, the folder holds two saved copies. The second copy lists two items. Milk was there first. Eggs came second. The copy keeps both lines, so nothing is lost.

Try it Yourself

Edit the code, then press Run.

Running is simulated

Exercise

What does version control keep?