Techinika started with a small team. Probably with one or two people. Let’s say they were working on a project called Isaha. This means that they were adding all their codes to the Isaha folder. As the project grew and the team became bigger, it gets harder to track who made changes, which changes were made, and when. What if there is a problem in the project and they have already sent it to their users? Will they stop the whole app to fix the problem? Not only this. Let’s say the team has grown and now they have 100 developers. If every developer changes something in the project, how is everyone going to update the main project? Will they exchange flash disks or send files by Email?
Well. This is very inefficient and it will take a long time that would have been used to focus on working on the project. And that is where version control comes in.
What is version control?
Version control is software used to help developers be able to collaborate on projects, track who made changes, and when they made those changes, and roll back to the previous version if there are errors in the current deployment.
This helps developers to:
- Develop faster,
- Collaborate easily,
- Track changes (kumenya impinduka zakozwe byoroshye),
- Sharing their codes easily.
Examples of Version Control Software
- Git (The one we will use)
- BitBucket
- Apache Subversion
- Etc
How does this work?
- Projects are managed as repositories. We have remote (they are online) and local (on our local computers) repositories.
- For the changes you have made to be added to the repository you are working on, you will add them to the staging environment.
- Commit the changes to the repository with messages. These messages help you to be able to come back to the previous commit when you find an error. These commits also keep track of who made the change and their message. This is why it is a good practice to always include a message that clearly explains the changes you made.
- Different people can work on different features on the same project at the same time. This is only possible because of the branch and merge features that allow the creation of different branches of the projects that will later be merged into the project. Consider these as branches of the tree, where each branch is different, but they meet at the main big branch.
- Finally, to track changes between local and remote repositories, we use pull and push commands to pull the changes someone else made or push to push our own changes.
We talked about Git, why choose Git?
As I said, there are more version control software, but we choose Git, because it:
- Is used by many developers and companies
- Allows developers to work from anywhere in the world
- Allows developers to see the full history of the project
- Allows developers to revert back to earlier versions of the project.
Using Git requires having it installed on your own computer. To download it, go to https://git-scm.com and choose the right one based on your operating system.
Now we have Git. Why do we need GitHub?
We said we need Git as version control, but we also need GitHub. It is not version control, but it uses Git to give its users the benefits of version control. It is the biggest platform used by developers to host their source code repositories and facilitate the organization’s collaboration. GitHub is owned by Microsoft since 2018. We will need GitHub to host our remote repositories.
To use GitHub, first, you need an account on the platform. To create an account, go to https://github.com and click on Sign Up in the top right corner, then follow the instructions.
Now you have Git installed and an account on GitHub, it is time to start getting used to them. We are going to make videos on basic and important usage of them, so make sure you follow our YouTube channel, so you will not miss them.
This is a summary introduction to version control made for beginners.
Thank you for reading, if you liked this post, it is possible that you will love other posts from us, join our community on WhatsApp if you want to learn more about what we do, visit our corporate website or use our email info@techinika.com to reach out to us.