Why Use a Version Control System?
What is Version Control?
We can a version (short: “VCS”) as of “database”. It lets us save a snapshot of our complete project at any time we want. later take at an older snapshot (let‘s start calling it“version”), our VCS shows us exactly how it differed from the previous one. Version control is independent of of project/technology/framework we‘re working with: It works well for an HTML website does for a design project or an iPhone app. It lets us work with any tool we like; it doesn‘t care what text editor, graphics program, file manager, or another tool we use. Also, don‘t confuse a VCS with a backup or a deployment system. We don‘t change or replace our toolchain start using version control. A version records the changes we make to our project‘s files. what version control is about. It‘s really as simple sounds.
Why Use a Version Control System?
There are many benefits of version for our projects.
Without a VCS , we‘re probably working together shared folder on the same set of files. Shouting through the office that we are currently working on file “xyz” , meanwhile, our teammates should keep their fingers off is not workflow. It‘s extremely error-prone as we‘re essentially doing all the time: sooner or later, someone will overwrite someone else‘s changes. With a VCS, everybody on the team absolutely freely – on any file at any time. The VCS will later allow us to merge all the changes into version. There‘s where version of a file or project is. It‘s common, central place: our version . Other benefits of VCS are even independent of working team or on our own.
Storing Versions (Properly)
Saving a version of our project after making changes is habit. But without a VCS, this becomes tedious and confusing very quickly:
- How much save? Only the changed files or project? first case, we’ll have time viewing project at any point in time – latter case, we‘ll have huge amounts of unnecessary data lying on our .
- How name these versions? If we‘re organized person, be an actually comprehendible naming scheme (if we‘re “acme-inc-redesign_2013-11-12_v23”). However, as soon variants (say, one version with the header area and one without it), the good we‘ll eventually lose track. important question, however, this one:
- How know what exactly is different in these versions? people actually take the time to carefully document each important change and include this in a README the project folder. A versioning acknowledges that project. Therefore, there‘s version on our disk that we‘re currently . Everything else – all the past versions and variants – is neatly packed up inside the VCS. need it, request any version at any time and we‘ll have a snapshot of project right at hand.
Restoring Previous Versions
Being able older versions of a file (or even project) effectively means one thing: we can‘t mess up! If the changes we‘ve made lately be garbage, simply undo them few clicks. Knowing make us more relaxed when important bits of a project.
Understanding What Happened
Every time we save version of our project, our VCS requires us description of what was changed. Additionally (if it‘s a code/text file), see what exactly was changed file‘s content. This helps us understand how our project evolved between versions.
A side-effect of distributed VCS like Git is that it can act as a backup; every team member full-blown repository of the project on his disk – including the project’s complete history. Should our beloved central server break down (and our backup drives fail), all we need for recovery is our teammates’ local Git repository.