Section Introduction
In this section of the course, we will examine how to implement version control into a Rails application. This will include: configuring your system with GitHub and pushing your repo to the web.
Guide Tasks
  • Read Tutorial
  • Watch Guide Video
Video locked
This video is viewable to users with a Bottega Bootcamp license

Now that we have our Rails app generated and we're going to start adding new features, it's time to talk about version control.

Version Control

If you've never heard of version control, think of it as a way to add versions to our code. Instead of going and changing code over and over again in our code-base, integrating version control allows us to create stages, where we can build each feature in its own version.

This may not sound like a big deal, but imagine a scenario where you have a giant application and want to add a new feature to it. What happens when this feature breaks the application?

If you are not implementing version control, you'll have to go to every file you worked on to identify the bug. This could mean opening and working on hundreds of files in an attempt to reverse what you did. That would not be an enjoyable way to develop.

A more professional way would be to create versions. This way if you make a significant change that causes a bug, you can always switch back to the previous version that was working properly.

GitHub

We will also discuss how we can push code to the web. This way our files are not only present locally, on your own computer, but also on the web for easy sharing and access. The tool we will use is called GitHub. By leveraging GitHub, we will be be able to have different versions of our code and monitor them.

From now on, as I’m building out the application, I’ll be pushing all my work up to GitHub at the end of every guide. This way, you'll be able to see the commands as well as the workflow for the project. This will give you the opportunity to reference the changes by version and allow me to revert back to a previous version if I make any missteps.

Let’s get going!