Version Control: Why it works, and how important the HEAD is to git
Version control is a system in software configuration management, that manages changes made to documents and, web sites, computer software codes, and basically, any project requiring revisit.
It comes with a whole bunch of advantages, including:
Ability to track changes: Version control makes it easy to track the progress of a project being done by one or more persons by keeping a timeline of changes made to the work. It does this by adding a hash to every commit made (a commit is a command that saves document changes to the local computer system), which can subsequently be viewed in the case where a revert is needed.
Document backup and restore: Given that changes are backed up in time, this allows for system restore to any particular point in the project timeline.
Branching and merging: This is especially useful when there are more people working on the project as in a team. Each member of the team can work from any part of the world, with the ability to make and share changes made to the project with ease. This is done by creating branches for each individual working on the document in question, and having them send pull requests (a pull request is a statement of intention made from a member of the team to the team head to view changes made to the document, and take neccessary actions), which are in turn viewed by the master account on the work being done, and merged if neccessary.
Team assessment: Version control also makes it possible to assess the contribution of every member of the team — even if their changes were deleted or over-riden by some better contributions. This is possible due to the system’s ability to track changes as noted earlier.
Conflict control: In a case where there are a multiple persons working on the same portion of the document at the same time, version control has a way of handling conflict. It places the conflicting changes on the same page, and allows for necessary actions to be taken. In most cases, all changes made by each conflicting user is presented, and the master account decides which changes to keep. A HEAD is the most recent commit done on a project, and it is important in solving conflict as it makes it easier to know which of the branches made the most recent change, without having to go through all the work done to decide.
Imagine working on a software code with millions of lines, and having tens of people making changes several times a day; the HEAD comes in handy as it helps in determining which changes to be kept, and which should be over-ridden.