Git Gud: A Guide to Git Flow

Danin Sudjono
PDB+R
Published in
2 min readMar 17, 2019
If you are a gamer (or ), you may have heard of this phrase

Hello, lovely readers of our Medium. It’s Danin again, and today I will be discussing about something called Git Flow. I’m going to assume you are well-versed in the basic concept of Git is and spare you the minor details. If you are unaware of what Git is, you can read about it at https://www.atlassian.com/git/tutorials/what-is-git
or any other online article on what is Git, and get back to this article later.

Git and Git Flow?

So now that you know Git is a version control system, what does Git Flow mean? Essentially, it’s an idea. A concept. A model of something called the Git workflow. When implementing Git in a project, you will be creating branches with individual features, and those branches will be merged to create the full product.

Why Git Flow?

There are 4 main reasons:

  • Ease of Parallel Development. Because all new features are isolated from the finished product.
  • Feature Collaboration. Because each feature is separated on its own branch, multiple developers can work together on one branch.
  • Staging. Once a feature is complete, it is put into the staging branch.
  • Emergency Fixes. Using the hotfix branch, we can fix bugs that occur in the master branch, and only contains fixes to the master branch.

How does it flow?

Yes, I stole this from my teammate’s article

Basically, each branch you see in the figure above has its own purpose in the development cycle of a Git project. They are as follows:

Master Branch: To store code that is ready to be deployed a.k.a the finished product.

Hotfix Branch: To fix bugs and errors that occur in the Master branch.

Staging Branch: The branch where features are integrated from the User Story branches.

Coldfix Branch: To fix bugs and errors that occur in the Staging branch.

User Story Branch: Where each individual feature is developed.

Our group, PDB+R, implements Git Flow in our work. Each of us develop individual features in individual branches, and review each other’s code before merging everything into the staging area, where our client reviews the current product. With this method, you can see individual progress, and merge all functionalities once they are complete.

To summarize, Git Flow is extremely convenient for project development in which individual features are separated during development, and collaborative work. A clean workflow is necessary for a well structured project. I hope you learned something from reading this article, and I hope our use of Git Flow will continue to benefit us in the future. Until next time.

References:
https://datasift.github.io/gitflow/IntroducingGitFlow.html
https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow

--

--