What is Git? This question often arises for novice developers or programmers. Through this article, you will find out what Git really is and what it does.
In short, git is a piece of software that allows programmers to collaborate in developing software.
For more details, read the explanation below.
What is Git?
It was mentioned a little earlier that git is a tool used by programmers/developers to collaborate in coding when developing applications/software.
Git itself is VCS (an acronym for Version Control System) which means version control or version controller in Indonesian.
This version control system allows users to automatically record changes made by users.
Instead of saving the project all from start to changes, git will save the changes made and log them into the database.
This tool is used by anyone, can be solo developers, large companies, to Linux.
While GitHub and GitLab are used online, git is installed locally on each other’s computers and uses a local connection or proxy server to collaborate.
Also, to use Git, you must be familiar with the Git GUI or Git Graphical User Interface.
With a GUI, you can enter the command line or commands so you can use Git to collaborate.
Meanwhile, for remote collaboration, you can use between GitHub or GitLab.
Previously, we also discussed the two, a comparison of the two in the article entitled GitLab vs GitHub.
Git has several functions that allow its users to do various things, according to their features:
- Collaboration – You can work on the same project with different people (team work).
- Open source – Git is an open-source tool that can also be used to create open-source software.
- Organize – Instead of storing your projects in folders like v1, v2, v3, and so on, you have a single project with a dedicated database containing all versions of a file.
- Platform Flexibility – There are several Git hosting services available today, including Gitlab, GitHub, Bitbucket, and SourceForge. Better yet, you can use a self-hosted solution for all your projects.
- Backup – You can easily revert to the previous version if an error or problem occurs when creating the latest version.
Git has its own workflow. There are at least five types of workflows that git uses.
1. Basic Workflow
The basic workflow or basic workflow from git is very suitable for developers who are developing simple and concise websites.
However, if there are two developers who develop several different functionalities in one application (one project), then this workflow is not an ideal workflow.
This is because in this workflow there is only one central repository, where each developer will duplicate their repository and work locally before placing it in the central repository.
So, developers cannot release applications/software if one of the features has not been completed because they are working in the same branch.
2. Feature Branch Kerja Workflow
The Feature Branch Workflow assumes a centralized repository, with a master representing the official project history.
Instead of working directly on the master branch, developers can build a new branch every time they start working on a new feature. Feature branch names should be descriptive.
Anything on the master branch can be de[loyandstable[loydanstable
If you want to create a new feature, create a branch from master and name it according to what it does, such as: upgrade-ui.
You can also create branches from existing feature branches.
3. Forking Workflow
The Froking workflow allows developers to have their own repository on the server instead of using a single server that acts as the centerpiece of the codebase.
The way this workflow works is that developers create their own repositories on the server side and then duplicate them into their local system.
The git remote path for the main repository is added to the local system and a local feature branch is created.
The pull request merge will be merged into the main repository on the server.
4. Git Flow Workflow
A Git Flow workflow is a workflow similar to a feature branch workflow. However, the difference lies in how the developer creates the branch.
In this workflow, the developer creates a branch of the develop branch which is a branch of the master branch.
Here, the developer should not directly create a branch directly from the master as this flow removes the problematic code from the master branch.
5. GitLab Flow Workflow
The GitLab flow workflow has some notable differences. The difference is in the branch environment in GitLab Flow, such as staging and production.
These branches exist because later there will be projects that cannot be deployed every time they combine feature branches.
There are 3 types of branches in GitLab Flow besides the master branch, namely the production, environment and release branches.
Through this article, you’ve read a little bit about what git is and what it does.
So it can be concluded, if you want to work with Git, you must understand what Git is and also the workflow of Git itself so that your work runs smoothly.
Also, get to know the basic commands of Git so you can use them.
We’ll cover basic Git commands in a separate article. Therefore, keep up with the GoldenFast Network blog, which provides information about the world of technology.
Hopefully this article is useful and see you in the next article.