This tool helps you implement the GitFlow branching strategy in Azure DevOps, by wrapping Git commands with scripts that integrate with Azure DevOps / VSTS / TFS for branch policies, pull requests, and automation.
It enables developers to use familiar git flow‑style commands while enforcing workflows via pull requests rather than direct merges.
This project uses the GitFlow branching strategy:
main: production-ready codedevelop: integration branch for new featuresfeature/*: feature branches created fromdeveloprelease/*: release branches created fromdevelophotfix/*: urgent fixes created frommain
- Initialize GitFlow branches (
develop,release,hotfix) in Azure DevOps - Commands to create, publish, finish feature, release, hotfix branches
- Enforces pull request usage (rather than direct pushes)
- Supports local branch cleanup and enforcement of
.gitignorerules - Cross‑platform support (Windows, optionally scripts for macOS / Linux)
- Git installed
- Azure DevOps CLI / VSTS CLI configured
- Personal Access Token (PAT) with rights to create PRs & branches
- (Optionally) Azure DevOps / TFS instance URL and permissions
git clone https://github.com/YourOrg/Gitflow-in-Azure-DevOps.git
cd Gitflow-in-Azure-DevOps
./install.batGetting Help You can run any of the below commands to get a cheatsheet for the tool:
git flow.help
git fhInitialize a repository To configure a repository to use this tool, you need to execute any of the below commands, this should be done only once per repository:
git flow.init
git fiFeature branch workflow You can create a new feature branch by running any of the below commands:
git flow.feature.start $feature_branch_name
git ffs $feature_branch_nameWhen you're done with your changes, you can publish the branch to develop by running any of the below commands on a checked out feature branch, this will create a pull request on the server:
git flow.feature.publish "$PR_title | $PR_description | $reviewer_id"
git ffp "$PR_title | $PR_description | $reviewer_id"Release branch workflow You can create a new release branch by running any of the below commands:
git flow.release.start $release_branch_name
git frs $release_branch_name When you're done with your adjustments, you can publish the branch to develop and master by running any of the below commands on a checked out release branch, this will create two pull request on the server:
git flow.release.publish "$PR_title | $PR_description | $reviewer_id"
git frp "$PR_title | $PR_description | $reviewer_id"In cases when you're certain that no adjustments are needed before the release, you can perform the two above actions at the same time by running any of the below commands:
git flow.release.all $release_branch_name
git fra $release_branch_nameHotfix branch workflow You can create a new hotfix branch by running any of the below commands:
git flow.hotfix.start $hotfix_branch_name
git fhs $hotfix_branch_nameWhen you're done with your changes, you can publish the branch to develop and master by running any of the below commands on a checked out hotfix branch, this will create two pull request on the server:
git flow.hotfix.publish "$PR_title | $PR_description | $reviewer_id"
git fhp "$PR_title | $PR_description | $reviewer_id"Other utilities When you want to do a local cleanup and remove all the branches already merged to develop and master, you can run the below command:
git general.clean
git gclWhen you want to force the application of the rules in the .gitignore file on an existing repository, you can run the below command:
git general.ignore.force
git gifPlease see CONTRIBUTING.md for instructions on how to contribute.
This project is licensed under the Apache 2.0 License.
This project is based on gitflow-in-azure-devops by @aruanoguate. Custom modifications have been made.
