Skip to content

Git Workflow

Hrishikesh Paul edited this page Feb 6, 2021 · 1 revision

Git Workflow

Below are a few rules to comply with our Git Workflow

Structure

  • main: Production branch
  • release: Branch that will have the changes that will be going to production
  • hot-fixes: Quick fixes to production
  • develop: Main branch to commit features/bug fixes etc to.
  • <action>/<initials>/<name>: See below for individual branch naming.

Naming Branches

To keep the workflow clean, branch names consist of actions, initials and name.

Actions

  1. feat: If the branch is a feature branch. remember to branch out for develop while doing this.
  2. bug: If the branch is a bug fix branch.
  3. hot: If the branch consists of hot fixes from the release branch.
  4. style: If the branch is solely for styling.
  5. ref: If the branch is a refactoring branch.

Initials

Your first name's first letter and last name's last letter. Example, form Hrishikesh Paul - hp.

Example of branch names

  1. feat/hp/client_login - Feature branch to add login functionality to the client.
  2. bug/hp/gateway_google_auth - Bug fix branch to fix google auth bugs on the gateway.

Commit Messages

While committing, please use a minimum of one line to describe what the commit does. Prefix the message with either of the following, depending on your task:

  • chore: If implementing somethign new or adding onto some feature. (git commit -m 'chore: implemented login feature on the client')
  • fix: If fixing a bug or a related issue. (git commit -m 'fix: issue with auth token not being passed form the gateway')
  • style: If adding styling, documentation or linting changes to the code. (git commit -m 'style: changed the color of the logout button')
  • ref: If you're refactoring a piece of code (git commit -m 'ref: improved logic of the mega-data-extractor by eliminating nested loops')

Pull Requests

  1. Review your code before pushing it
  2. Make a pull request
  3. Add a small title/description for the PR
  4. Assign yourself (or other members of the team)
  5. Add reviewers
  6. Add a suitable tag
  7. Add a suitable milestone
  8. Add a suitable project 9.Add checkboxes for reviewers
Clone this wiki locally