Git Flow Workflow
You need to find out what kind of pull request you will create. If the bug happens on the Production server, you must create a HOTFIX, whether a P0, P1, P2, P3, P4, or P100; any bug in production should create a HOTFIX PR to fix it.
Feature PR
If it is a new feature, then create a new branch from develop branch
git checkout develop
git checkout -b feature/xxx
Then create a PR with develop branch as the target
Hotfix PR
But if it is a hotfix, then create a new branch from master
git checkout master
git checkout -b hotfix/xxxx
Then create two PR, which are
- PR to master
- PR to develop if just a bug fix of an unreleased feature (happening on local or staging), then do not use the HOTFIX word in your PR title
Why do we need to create two pull requests?
Because we use Gitflow. Read more here
Gitflow Workflow | Atlassian Git Tutorial
on that page, it says
It means merging hotfix_branch to the main and develop branch. So if we use GitHub, we have to create two pull requests
How to create Hotfix branch
How to release as teams
Each team should have its release branch
Open this file on Draw.io for more detail
Hungryhub GitFlow.drawio
../Image-Video/Guide/Git_Flow_Workflow_20250811134845_bandicam_2023-04-17_14-37-49-672.mp4