5 Git Workflows you can use to deliver better code

1. Basic Git Workflow

The most basic git workflow is the one where there is only one branch — the master branch. Developers commit directly into it and use it to deploy to the staging and production environment.

Basic git workflow
  1. Collaborating on code will lead to multiple conflicts.
  2. Chances of shipping buggy software to production is higher.
  3. Maintaining clean code is harder.

2. Git Feature Branch Workflow

The Git Feature Branch workflow becomes a must have when you have more than one developer working on the same codebase.

git workflow with feature branch

3. Git Feature Workflow with Develop Branch

This workflow is one of the more popular workflows among developer teams. It’s similar to the Git Feature Branch workflow with a develop branch that is added in parallel to the master branch.

git workflow with develop and feature branch

4. Gitflow Workflow

The gitflow workflow is very similar to the previous workflow we discussed combined with two other branches — the release branch and the hot-fix branch.

The hot-fix branch

The hot-fix branch is the only branch that is created from the master branch and directly merged to the master branch instead of the develop branch. It is used only when you have to quickly patch a production issue. An advantage of this branch is, it allows you to quickly deploy a production issue without disrupting others’ workflow or without having to wait for the next release cycle.

The release branch

The release branch is forked off of develop branch after the develop branch has all the features planned for the release merged into it successfully.

gitflow git workflow

5. Git Fork Workflow

The Fork workflow is popular among teams who use open-source software.

  1. The developer forks the open-source software’s official repository. A copy of this repository is created in their account.
  2. The developer then clones the repository from their account to their local system.
  3. A remote path for the official repository is added to the repository that is cloned to the local system.
  4. The developer creates a new feature branch is created in their local system, makes changes, and commits them.
  5. These changes along with the branch are pushed to the developer’s copy of the repository on their account.
  6. A pull request from the branch is opened to the official repository.
  7. The official repository’s manager checks the changes and approves the changes to get merged into the official repository.

Automating your Git Workflows for better productivity

One of the things that developers have to constantly juggle with is updating their scrum tool to keep their teammates updated. That’s why, at Zepel, our developers automate their workflow, so they can spend more of their time building the software.

Your own workflow!

The git workflows I’ve shown in this article are examples of some of the popular and best working workflows for the development team. Some teams create a branch for Staging and it works perfectly for them.

call to action button to improve development process with zepel



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store