Fork me on GitHub

Source control

Source control systems, also known as version control systems, store code and other static files, such as images, with a history of the changes made to those files.

Why is source control necessary?

Version control systems allow developers to modify code without worrying about permanently screwing something up. Unwanted changes can be easily rolled back. Developers can merge changes with other developer's code through diff views.

These benefits exist on all software projects. Therefore version control is a necessity regardless of time size or the programming ecosystem used. Every project should immediately begin by using a version control system such as Git or Mercurial.

Source control systems

  • Git is a free and open source distributed version control system.

  • Mercurial is similar to Git, also a free and open source distributed version control system.

Source control hosted services

  • GitHub is currently the most commonly used source control platform for using Git.

  • BitBucket provides free Git and Mercurial repositories for open projects and private repositories for up to five users. Users pay for hosting private repositories with more than five users.

Source control resources

Source control learning checklist

Pick a version control system. Git is recommended because on the web there are a significant number of tutorials to help both new and advanced users.

Learn basic use cases for version control such as committing changes, rolling back to earlier file versions and searching for when lines of code were modified during development history.

Ensure your source code is backed up in a central repository. A central repository is critical not only if your local development version is corrupted but also for the deployment process.

Integrate source control into your deployment process in three ways. First, pull the project source code from version control during deployments. Second, kick off deployments when code is modified by using webhooks or polling on the repository. Third, ensure you can roll back to a previous version if a code deployment goes wrong.

Now that your source code is versioned, what's next?

How do I deploy the code I've created for my web app?

I want to learn more about the users of my application.

How do I integrate external APIs into my web application?


Interested in a complete Full Stack Python book with detailed tutorials and example code? Sign up here and you'll get an alert email if a book is created. No other emails will be sent other than sign up confirmation.