- Git Flow Strategy Verion 0 - Hieu Tran
- Git Flow Strategy Version 1 - Hieu Tran
- Git Flow Strategy V2 - Hieu Tran
- Git Flow Strategy v3 - Hieu Tran
- Git Flow Strategy v5 but the blog title is so long, and I need to truncate it a little bit - Hieu Tran
- Git Flow Strategy v6 but the blog title is so long, and I need to truncate it a little bit - Hieu Tran
Git Flow Strategy
Hieu TranDecember 12, 2023, 3:08:00 AM GMT+0
When I have to manage a platform, and our team have to to develop multiple features at the same time, however, release all of some of those features will be decided in the QA phase, and after some discussion, we decided to use this git flow strategy to solve our problems.
Repository Setting up
// Check the currently registered remote list
git remote -v
// Reset the remote address information for the main repository
git remote add upstream https: //github.com/company/project.git
// Check if it is properly registered
git remote -v
// Correct configuration output result
origin https: //github.com/hieutran/project (fetch)
origin https: //github.com/hieutran/project (push)
upstream https: //github.com/company/project.git (fetch)
upstream https: //github.com/company/project.git (push)
// If the main repository is set as origin
git remote remove origin
// Reset the remote address information for the personal repository
git remote add origin https: //github.com/hieutran/project
Setting up diagram Work on a task git flow
// Checkout the working branch to work
git checkout origin feat/task-1
// Commit code to private repo
git add .
git commit -m 'feat: finish task #1'
git push origin task-1
Create a branch to to a task diagram Pull Request git flow

Pull Request diagram Merge and Deployment
// Fetch the release-1 branch of main repo into release-1 branch of local
git checkout release-1 (don't need upstream)
// If already fetch the release-1 branch to the local, use the bellow
// command to get the latest code of the branch.
git pull upstream release-1
// Merge code at local, and push into the private repo
git add .
git commit -m 'conflict: solved conflict: #1 a.json line 2'
git push origin release-1
Merging & Deployment diagram