Post 1: Phase 0 Basics
What is version control and why use GitHub?
May 23, 2015
For the first five years of my adult life I was a teacher. I would make most of my materials by hand either creating them from scratch or compiling pieces of documents and PDFs from the pros. I would often find myself opening a document closer to copy time and realize the file looked different than I had expected. Because I backed up all my files up on Dropbox, this was an easy fix. I could open old versions of the files without overwriting my current file. Dropbox saved them as the same file but with "checkpoints" along the way when I had pressed save. The checkpoints were organized by date, and I could access any of them at any point in the process. This was the "version control" for my teaching materials. We have all created an edited a document where later down the time we wished to return to a previous version. Perhaps names have changed or you deleted something you wish you had not. In any case, it can be extremely important to access prevoius versions of our files. This is also true in the development world. Many times when working on projects we wish to refer back to dates at which we completed the project or components within the work. Version control systems allow us to achieve this. Version control is a way to manage your files over time and their various revisions along the way. This allows developers to access their work at certain checkpoints they saved throughout the process. This can be particularly helpful when working in a team setting and needing to identify who contributed what and when and which version along the way proved most effective. Imgaine you have been working on a code or a solution. Now you find a bug. You could refer back to some of these checkpoints to find a time when the commands still worked to help identify the issue. You can also see at which points in the process various team members have contributed or made changes.
Git is a version control system. It is distinguished from other version control systems by several of its features. It does not rely on a conneciton to a central server or the internet. It can access files historically or presently on your local system. It also works in a non-linear way allowing users to access historical versions of their files quickly. To store previous versions Git takes "snapshots" of the file along the way verses saving new versions of the file.
We have all worked on group projects in our lives where the greatest challenge was not in the work itself, but in the logistics of collaboration. One person might begin the task, send it on to the next person to make changes, and simply wait for the new version of the project to return. Then a cousin to the game of phone tag may ensue. Or, perhaps a couple team members begin the project and want to share and combine their outputs, which proves to be quite the challenge as someone will need to see both versions, choose which one to modify, make the necessary changes, and all will be done by hand. GitHub helps provide a version control system to manage all of this work that is both accessible locally on your computer and remotely on the web. Another issue you might be all too familiar with is the Google Docs conundrum where some good-intentioned soul tries to edit your communal document and ends up altering the only version you have (unless you had premonition and happened to save it elsewhere). GitHub also has good systems in place to help prevent and resolve these types of issues by saving verisons over time and allowing user to first make changes locally before pushing them to the remotely shared directory. GitHub is a central site that allows a team to contribute to the same project with version control features in place. The changes you make using Git can be stored and accessed remotely on GitHub by a team. The developers can each work on the project individually as well as see, share, and even combine their contributions. GitHub is widely used in the development industry because of the ease of accessing those checkpoints I described earlier, and the protective processes that help prevent teammates from overwriting each other's work in a permenant way. A user can see what each contrbution was, in what order they were completed, and who was responsible for each. The user can also access any point along the way that was pushed to GitHub. Once familiar with the specific commands, the process of aligning the local files on your computer with the remote files on GitHub is fairly simple and smooth.