Migrating from Trunk Based development to Git-Flow workflow in Azure Repository
To change the git branching model from Trunk based to Git-Flow based, you have to first understand the basic difference between Trunk based development and Git-flow workflow.
The changes required to implement the migration are creating new development branch and applying policies to make it default merging branch and locking master branch.
Create a 'develop' branch.
Click on 'Repos -> Branches' to open branches settigns menu.
Go to Branches to apply 'Branch Policies'.
Change default branch from "master" to "develop"
Select the 'develop' branch row.
Click on the right side dots and open the properties menu of the 'develop' branch.
Select 'Set as default branch' and set the 'develop' branch as ' default' branch.
Select the 'master' branch row.
Click on the right side dots and open the properties menu of the 'master' branch.
Select 'lock' to lock the 'master' branch and prevent any future changes.
and set the 'develop' branch as ' default' branch.
领英推荐
Apply Branch Policies:
Apply branch policies to develop to mirror existing policies on the master branch (expected settings)
A. Required minimum number of reviewers
B. Check for linked work items: Required
C. Check comment resolution: Required
D. Limit merge types: Squash only
E. Build Validation
F. Automatically include reviewers; Enabled
Additional Notes:
If you want to do the long read:
The above documentation assumes you have the git-flow extensions installed in your local git path. But processes and principles still apply.
Intikhab Alam is a DevOps consultant and currently working on Big Data project.