Introduction to Version Control
Version control is a system that records changes to files over time so you can recall specific versions later. It lets teams of developers work on the same codebase without overwriting each other's work, and it keeps a full history of every change ever made.
Git is the most popular version control system in the world. Unlike older centralized systems, Git is distributed, meaning every developer has a full copy of the project history on their own machine, which makes it fast and resilient.
Why use version control?
Version control lets you track changes, undo mistakes, collaborate with others without conflicts, and understand who changed what and why. It is essential for any serious software project, from solo scripts to huge teams.
Centralized vs distributed
Centralized systems like old-style SVN store history on one server. Distributed systems like Git give every clone a full history, so you can work offline and still commit changes.
git --versiongit version 2.43.0Checks that Git is installed and shows the installed version.
git helpusage: git [--version] [--help] ...Shows a list of common Git commands and how to get more help.
Key points
- Version control tracks changes to files over time.
- Git is a distributed version control system.
- Every developer has a full copy of project history locally.
- GitHub is a popular hosting service built around Git.
