Version Control
- Details
- Last Updated: Thursday, 17 August 2023 15:55
- Published: Wednesday, 16 August 2023 00:43
- Hits: 280
Version Control Software (VCS):
This refers to Version control (also known as Source Control, or Revision Control or Source Code manangement), where changes to a file or files is managed via a software called as "Version Control Software". In any modern software development, any program that we write goes thru changes over it's lifetime. If we didn't maintain a revision history of the changes, it would pose too many problems. Some of the common ones would be:
- If the file accidently gets deleted or corrupted, our whole program is gone for ever, unless we kept backups. VCS. allows us to keep multiple backups at regular interval (either automated or manual).
- With changes happening to our program, we want to keep a snapshot of changes, so that it's easy to revert to any previous state of the program. As an ex, if we have 5 files for a program, and we get it to work, we might want to keep a snapshot of this working program. Then we go ahead and make enhancements. If we create a bug, where the whole program now now refuses to even compile, one way is to debug it. But other easier way would be go to the snapshot and see what all changed. Or we can just restore the copy from snapshot and start from there. VCS allows us to do that.
- With multiple people working on the same program, VCS allows us to easily merge all these changes in the central repository, without having to manually figure out all the changes and then integrating them.
Wiki: https://en.wikipedia.org/wiki/Version_control
Popular VCS are RCS, CVS, Git
Very good explanation of how VCS should work: https://tom.preston-werner.com/2009/05/19/the-git-parable.html
RCS:
VCS:
Git: