Globalization is not a buzzword anymore, it is already arrived in our daily business. Consider that students work on projects in Google Drive, business travelers update their expenses in a Dropbox file or exchange data via Microsoft Teams. A question remains. How the data will be controlled?

Is there a gate which stops the other person from putting nonsense into the file? Or, if someone did, is there a way to restore the file to a previously known “good” state? This is where a respository is needed.

For some types of documents it’s not terribly important to be able to maintain details of what changed. For instance, you would not want a receipt to change, but if you are working on a document, if you are anything like me, then you want versions of your document as it goes through its various stages. The versions allow you to draft and improve ideas before the final version is submitted.

Rather than saving your document as file.txt, file-v1.txt, file-v2.txt, file-final.txt, file-final-final.txt there is a better way. With a version control system your document is saved simply as file.txt and save your changes into the repository by committing them. If you want others to have those changes you “push” them to the main repository.

A repository has its origin in the software development. It is a central storage for documents, data, objects and programs, including their metadata. A good repository shows you many important things, including:

  • File name
  • Who made the change
  • Who approved the change
  • What in the file changed
  • When the change was made
  • What happened if there was a conflict

A picture of the DITA Open Toolkit repository as shown in SourceTree. The repository is maintained on GitHub.

Version Control System

A version control system allows you to save snapshots of files you are working on. Imagine a folder full of various files. At some point you need to make a save point to your folder before you continue to modify it. The TimeMachine software on many Apple computers saves snapshots of your files so that you can restore them if something goes wrong. TimeMachine is backup software, which is a type of version control, but it is not a repository.

A version control system can keep a history of your project during its development. If you decide that your last change was not the best idea, you could easily jump back to a previous version and continue working on it. You do not have to think much about making configurations during your software project because you already have saved a point in your history where your project is working.

The save points (also known as commits) are saved in so called branches. Think of a branch as a sort of link list which connects your save points together. As long as you continue to build commits, you continue to grow your branch. If you want to create a feature to your software project, you could add a feature branch in your repository. This means that you could work on your feature without disturbing your flow in the master branch. The advantage is that you could work on the feature while another developer could continue modifying the main software. Once the feature branch is done, it can be easily merged with the master branch in a new save point.

Working alone vs. with others

Repositories help solve a colloboration problem. In software development some of the source files can be quite large. Different developers will be responsible for making changes to different sections of the same file.

Some version control systems lock files allowing only one person at a time to make changes. While effective at preventing conflicts, it raises other issues. First, if another person needs to make changes to the file, they must wait until the first person has completed their work and submitted it. Second, sometimes people keep files locked even when they’re not actively working on them (such as when they go on vacation). Neither is very co-worker friendly or efficient.

Better version control systems allow multiple people to work on the same file simultaneously. Changes from each person is merged automatically so long as there are no conflicts. If there is a conflict, such as both people changing the same line, then the changes must be reviewed and a decision made whose change will be kept. The nice thing is that only the lines with conflicts must be reviewed. A file with conflicts cannot be merged. The system prevents it. And even though reviewing conflicts is not ideal, such a system is much faster and efficient since conflicts are not the norm.

But not just for software development

Version control and repositories are not just for software development. Many groups could benefit from repositories. Any documents where multiple people must contribute to it or documents that must be maintained over a long period of time are good candidates for belonging in a repository. So is any document that must show the change history for regulatory reasons, such as medical device manufacturers.

To ensure that everyone who is working on the project has full access of the repository, we highly recommend to use an online version control system. Therefore, everyone can take the information from the central repository and start to work on the project without disturbing someone else. When the other person is done with his work he can push the repository back to the central one and other collaborators can continue to work on the new version.

 

Related Posts