Version control
Version control (a version control system, or VCS) is a system that records every change made to a project's files — most often source code — so you can review the history at any time, restore an earlier state and establish who changed a given fragment and when. It is the foundation of modern software development and the basis for collaboration in teams of any size.
How version control works
Instead of overwriting files, the system stores successive snapshots (commits) of the project's state. Each commit contains a set of changes, a message and information about its author and time, and all of them form a chronological history. The key mechanisms are:
- branches — parallel lines of development where you can work on a new feature without affecting the main version;
- merging — combining changes from different branches into one, with conflict detection;
- history — a complete record of modifications that makes it possible to undo a faulty change;
- remote repository — a shared server through which the team synchronizes its work.
The most widely used system today is Git — a distributed VCS in which every developer holds a full copy of the history. Code is hosted on platforms such as GitHub, GitLab or Bitbucket.
Practical application
Version control lets many people work on the same project at once without the risk of overwriting one another's changes. It enables code review before merging, a quick return to a working version once a bug is found, and safe experimentation on separate branches. The repository is also the starting point for CI/CD pipelines: every push can automatically run tests and deploy to a server. That is why a VCS today goes beyond code alone — it is also used to version infrastructure configuration and documentation.
Powiązane pojęcia
Najczęstsze pytania
What is the difference between centralized and distributed version control?
In a centralized system (such as SVN) there is a single main repository on a server, and developers check files out of it. In a distributed system (such as Git) every developer keeps a full copy of the repository, including its entire history, which allows them to work offline and commit locally before pushing to a shared server.
