What is Version Control?

How does version control work in general? What benefits can I expect?

Transcript
What is Version Control?

Welcome to our video series on learning version control with Git. Let’s start with what version control actually is - and why it’s so useful.

Every project evolves in little steps: you change a file here, add a couple of files there, make some more modifications… Each of these steps is effectively a new version of your project.

With a version control system like Git, you can save these versions, like in a database. Any time later, you can then have a look at each version and see what was changed.

Without a version control system, people often use folders to get such a functionality. A new folder for each version. However, this approach has countless drawbacks: e.g. you can’t easily tell how exactly these versions differ; what was changed. Also, you copy the complete project, which is very inefficient. Lastly, it’s very hard to keep these variants in sync while the project moves on with other changes.

A version control system solves these issues.

First, it saves versions in a professional way: it doesn’t need extra folders or complete copies of your project. It handles this in a very efficient and transparent way. When saving a new version it also saves when those changes were made and by whow. And it requires a message that describes the changes - so you and your colleagues understand them later.

Maybe most importantly, version control lets you easily see what was changed exactly. You don’t have to search long which files have been modified and how. At a glance, you can see which files were concerned and how exactly they were changed.

Also very important: you can always restore any previous version of your project. In case anything went wrong, you can easily undo changes and go back in time. This should help you sleep more easily.

With a concept called “branches”, Git allows you to work on new features and experiments more safely. In short, a branch creates a new context that is separate from any other context in your project. You can think of it like a copy your project in a new folder. You can then experiment and make changes however you like - without affecting any other parts of your project. Messing up in one branch will not break your project in any other branch.

Version control also helps when collaborating with other people. It makes sure that your changes are automatically combined with your coworkers changes - even if they happen in the same file. Without overwriting each other.

A pleasant side-effect of version control is that it also provides you with a backup of your project. Any person that works on the project automatically has a full-blown backup on his disk; including the complete history of changes.

That’s it for now. See you soon in our next video.