Git Workflow

OverView

In our current day-to-day coding work, we are following GitFlow. Please check the link to learn details Gitflow Workflow .

Every developer should follow the following rule strictly otherwise no pull request will merge.

Rule to Follow:

  1. We are using Gitflow (simplified):

    1. There must be no direct commits to the development/master branch.

    2. Each story/bug/task must be developed on a separate branch. it is not applicable for the subtask.

    3. Branch name should be correlated with bug/feature name

    4. Merge develop branch to feature branch often to limit conflicts

    5. Code must be merged to develop branch by a pull request from Bitbucket

    6. Merge can be done after testing bug on the branch

    7. Pull request must have a reviewer and must be reviewed by other team member or at least Tech Lead before merge

      1. It is very easy to spot most simplest problems with code

      2. Comment code, not a person

      3. When reviewed - don't take it personally

  2. Branch naming format is in TitleCase (if no JIRA ticket JIRA parts can be skipped): {JIRAQueue}-{JIRANumber}-{TicketTitleOrTwoThreeWordsOfDescription}. (Example: CE-321-FixForSavingTicketStatus)

  3. Commits must have meaningful note and ticket / bug number from JIRA if applicable, First line format: {#JIRAQueue}-{JIRANumber} - {Ticket Title Or Description} (Example: #CE-123 - Added Additional Status Check) . try to. use some keywords in the commit such as Added/Updated/Deleted etc.

  4. Pull Request title should match/be close to branch/bug name and contain Jira ticket number.

  5. For HotFix(Customer Issue/ Production fix) branch should be created from the master branch and pull request should be created to master and develop the branch.

  6. For any new story/task/bug create a feature branch from develop branch and send a pull request to develop the branch after finish work.

  7. Never change automatic merge commit message manually (to sync or merge, leave it as is)

  8. Add Tag to master / develop branch after each prod deployment, it is important to know when the deployment was and which changes are not included in prod.

 

Rule to work on Customer Issues:

  1. Create a separate branch Hotfix_TaskName_ReleaseDate from master

  2. Developers will provide pull requests to this HotFix branch.

  3. We will deploy this branch to Dev Env for the test.

  4. After pass the test, provide a pull request from the HotFix branch to the Master and Develop branch.

  5. If the test fails go to step 2.

  6. Release master branch