As the process of software development becomes more complex, so do the requirements for maintaining the development process. As you will come to understand throughout the training, maintaining your applications, and developing code that can be updated is an important part of the development process that you will be responsible for designing. Maintaining and tracking the changes in your code is something that Version Control Systems can assist you with.
A Version Control System (VCS) or Revision Control System is a set of tools that can be used to create records of the different states of your project. These states will often be referred to as revisions. Revisions will usually have a number associated with them for identification purposes, such as the first version of your codebase might be called “revision 1” the next might be called “revision 1.1” and so on. VCS stores the historical data that makes each version/revision different from the next, and through a VCS we can restore different versions of our codebase when necessary
What is GitHub?
Github is a remote hosting service with an integrated set of tools for assisting with software development via a VCS. At its core, GitHub provides developers with a remote location to store the projects they are working on, based on historical processes used to create the projects. This differentiates substantially from a trivial backup facility, where a resource’s history may not be taken into consideration. GitHub relies substantially on other software called Git to achieve this. While GitHub focuses on the remote requirements of VCS, Git’s primary purpose is to fulfil the localized requirements for VCS.
It’s also worth noting that there are other remote VCS services, GitHub just tends to be one of the more popular ones. Although GitHub is the remote VCS we have chosen for this course, we nonetheless encourage you to examine others which may also provide facilities that are more suitable for your project’s needs, such as BitBucket.
Git is a VCS that is installed locally on a developer’s machine. It will be used to track all of the different revisions of a software development project locally. This data can then be pushed (or uploaded) to a remote VCS such as GitHub. Once the project with all of it’s revision data is stored remotely, this opens up the possibility for software development projects that can span across the globe as developers are no longer limited to work within teams that all share the same physical resources.
Git comprises much of the underlying functionality that GitHub presents in an easy to use web-based interface. It allows users to extend local development using Git to remote collaboration on the web. This opens an array of possibilities for collaborative project development. Github also offers a free web hosting facility to its members.
Tools for Developers
The process of developing more complex software is generally not linear but rather iterative. For example, when developing a website you might like to try styling certain elements of your site differently. However, seeing these changes implemented in your site might require replacing your existing CSS with the modified version while not knowing if you’re going to like the changes you make. This could be particularly destructive to your site, especially when the changes require modifications to the site’s structure or DOM because multiple files could get affected by the change. You might subsequently make these changes nonetheless, only to realize that you preferred the site before the changes where implemented. Restoring your site to its previous state, in this case, could be very time-consuming as you manually sift through file after file, one line of code after another trying to identify and decide what should be kept and what needs to be reverted. Saving a backup of your project to circumvent this situation would just result in large amounts of disc space inefficiently used.
Git and subsequently GitHub implements a unique Revision Control System or Version Control System that addresses this problem amongst many other issues related to the process of developing software. These are the main automation tools that the Git VCS provides us with:
- Storing, organizing and working with data locally,
- Identifying changes between different data states,
- Providing us with efficient means of addressing these differences,
- Interfacing with a remote resource (GitHub), individually and as teams