Have you ever had to edit a file with someone simultaneously for a project? How about the difficult of sharing those newly edited files, and having to save every newly edited version? The version control system “solves the file sharing problem” by providing one main repository that contains all of the files for the project. Team members working on a project are able to check files out of the main repository, make changes to them, and then check them back or, or commit them. This system is able to automatically note who has made changes to the files and when, what exactly was changed, and merge these multiple changes to the same file.
Git is a distributed version control system that anyone can use- it is free, and not at all difficult to learn. Essentially, it is a place where people can upload files for projects, and the changes made to those files will be documented. One major benefit of Git is the community. People using Github can share their files and code with each other, along with ideas and advice with issues involving coding. Among the other benefits of using Git as your version control system for your project are that everything is local, and Git prevents any unintentional overwrites of files that are on the shared repository.
The basic GIT commands are as follows: git init, git remote, git add, git commit, git push, and git pull. Git init will initialize the repository, and git remote will add a remote place. The git add command can be compared to when you go grocery shopping- you are adding files to the staging area, or adding items to your cart, but you have not purchased them yet. Git commit is when you are actually purchasing the items- or, committing the changes you have made to the files to the local repository. The git push command will then push those changes you have made from the local repository to the remote repository. If you wish to make changes to those files in the remote repository, the git pull command will pull changes from the remote repository to the local.
There are three different types of version control systems: local, centralized, and distributed. GIT is a distributed version control system, and one of its main benefits is that there is no single point of failure. A centralized version control system, however, does have one. The setup of a centralized version control system is one central, single server that contains all of the versioned files, from which multiple clients may check out files. The biggest downside to this setup is that if the single server goes down for some reason, nobody is able to collaborate or work from it. Even worse, if the server is corrupted, everything will be lost.
So, why exactly should web developers/designers use a version control system? There a handful of reasons: first and foremost, team members have the ability to freely work on any file at any time. When using a version control system, they don’t have to worry about yelling to team members that they are currently working on a certain file at that moment, and so the other team members need to keep their hands off of it. Without a VCS, all files are vulnerable to being overwritten. VCS also allows users to see the changes they have made to a file as versions of that file that are properly stored. This may also allow the user to pinpoint where they may have made a mistake along the way. Needless to say, there are for more positives to utilizing a VCS than there are negatives.