While browsing information on web development you must have stumbled phrases like “git version”, “merge git to master”, and other git-related texts. But what does Git mean?
Well, everyone who’s up to development eventually learns the devs slang and technical definitions. One finds the information on the internet, and those who work with us, have a personal project manager to explain all the details and intricates of software in a comprehensive manner. For those of you who are not working with our team yet, we made this post about Git.
What does Git mean?
So, now let’s clear up the definition. In plain language, Git is a version control system. What does it mean? Imagine several developers who are working on a code and adding new features to it. If they just add the new versions of their work done to the main source, all the code would be messed up in a chaos.
In order to avoid this chaos, the Git system has been created. It allows to track changes in computer files and coordinate the work on those files among multiple people.
How does Git work?
Since Git is a distributed version control systems, developers don’t work with a single repository on a server, instead, everyone has their own local copy of a repository. Therefore, such operations as “checkout” or “commit” are produced on a local repository. When you need to sync repositories, you need to use special commands such as “pull (fetch)” or “push”. This comes very handily as devs can commit anytime, even when the server connection is currently unavailable.
Another adorable thing about Git is the comprehensive work with branches and the mechanism of merging them. Here’s how it works:
The main facts about Git:
- Everything starts with a default master branch which should be always ready for the deploy to production.
- New features and bug fixes are always made in the new branch before adding them to master.
- Always remember – each new feature needs the separate branch. The same comes with new bug fixes, experiments etc.
- To make the workflow smooth always leave the comprehensive comments to each commit.
- Features can be merged to master only after complete bug fixes and tests.
The only exception when you can commit directly to master branch is when you are 100% sure that this small change would not cause any problems down the line. That means you have no doubts about the new feature and it won’t require extra bug fixes. Therefore, such changes that are committed directly to master should be really small and easy to track or fix.
Typical Git workflow in GBKSOFT
We have chosen Git as a version control system due to its convenience and versatility. Since almost all the processes are running locally, developers don’t even need an access to internet or server while working. The projects are stored locally on their computers.
Moreover, Git creates an index for each file. That means every time you make any changes, Git knows it. This feature is a part of the grand philosophy of Git. This way it is impossible to lose, copy or destroy any information from the project without Git knowing about it.
Below we’ll explain the way our coders work with Git during the development of your project. So, be prepared to know the developers routine.
Let’s start with the basics.
Each project is stored in a separate Git repository having a master branch – which is the main version of the project code.
Each task is developed in a separate functional branch where the programmer is working with it before merging to master branch. Every time you add a new functionality, a new commit is created. This allows to later understand what feature has been added, by whom and when.
When the task is complete, it should pass the code review stage. If no bugs are found and there is nothing to fix, the branch can be merged to master.
Since every project we develop is divided into milestones, we never pass to the next one until the tests are complete. That means all our clients receive the tested bug-free end product, that we can be proud of.
From our practice, teamwork with Git is the best way to avoid bugs, code copies, or any other code defects. It simplifies the workflow, makes it smooth and well-planned. Each developer is working in his own branch so no one can interfere with his own work.
The development process is complex, difficult and seems like a pure magic for many people. So if you want to stay tuned and know all the “tech” jargon, subscribe to our blog and learn something new every day!
Ready to start your own project?