What is Version Control?

Do you have files like final.txt, final_revised.txt, final_revised2.txt, final_revised2_revised.txt?

final doc comic
'Piled Higher and Deeper' by Jorge Cham www.phdcomics.com

This is a “local version control system” which depends on your memory and organization to avoid errors and utter confusion. Automated version control WILL make your life better!

Why Git?

Git is a free, distributed version control system. Rather than storing a series of copies of a file with different filenames, Git captures a snapshot of your project each time you commit. The complete history of your project is safely stored in a hidden .git repository. Everything is recorded with checksums to ensure no information can be lost or corrupted without detection. Each commit records the creator, email, and changes made, providing transparency and credit for your project.

file versions
Adapted from: Software Carpentry, Version Control with Git

Git is distributed meaning every copy of a repository contains the complete history. This is great for collaboration, fast performance, and offline usage. Git can efficiently branch and automatically merge different sets of changes together, enabling people to work in parallel and sync their files.

branch and merge versions
Adapted from: Software Carpentry, Version Control with Git

With Git you can make changes and experiment without fear! When committing to a repository Git only adds data, it never deletes information. This makes almost everything undoable!

Combine it with cloud repository hosting, such as with GitHub, and you have a really useful tool.

Example Use

Software Carpentry, “Version Control with Git” lesson: