From the course: Programming Foundations: Version Control with Git (2020)

Why you need version control

From the course: Programming Foundations: Version Control with Git (2020)

Start my 1-month free trial

Why you need version control

- When you're working on any type of document, why do you save your files? To retain the changes, right? But every time you save a file, those updates override the previous version. If you need to go back, you can only undo so many times. So if you've ever had to create multiple versions of the same file to track your changes or to have a backup copy, you've created a rough version control system. Using this method, our workflow for building a basic website might look a little something like this. First, we start by creating an HTML file and add some code and content to it. Then we make another revision to the HTML file. We want to keep the first version just in case we need to go back to it. Then we'll add a CSS and JavaScript file. And now that we've received the final copy for the website, we feel pretty confident about deleting the version one HTML file, but we're not ready to let go of version two just yet. So we make another copy for the updates and call it final. There's no change to the JavaScript file, so we can leave it as is. But we want to experiment with some CSS. So we make a copy just for testing. Unfortunately, there's been a change to the content. So now, you have to update your HTML file which you previously thought was going to be a final copy. You then finish with your CSS experiment, and it worked, so you name it v2. At this point in the project, you have a bunch of extra copies and some naming conventions that may be confusing. And this is a pretty basic example. Most projects will have many more files. With an actual version control system, file management is a lot more organized. In this next lesson, we'll look at the same workflow, but with a version control system like Git.

Contents