This tool allows the implementation of the GitFlow methodology for branch management along with code review practices enforced by the usage of pull requests.
Since the pull requests are not a native git feature, we rely on Azure DevOps or Team Foundation Server to handle them. Also, please consider this tool only works on Windows operative system.
If you want to learn more about the GitFlow methodology, you can follow this link.
The use of this toolset asumes you have completed the below steps:
- Install the latest VSTS CLI
- Create a personal access token
- Setup your credentials on VSTS CLI
- Execute this command
vsts configure --use-git-aliases yes
- Clone the repository
- Move to the repo's main directory
- Run
install.bat
At any moment you can run any of the below commands to get a cheatsheet for the tool:
$ git flow.help
$ git fh
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 fi
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_name
When 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
$ git ffp
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_name
When 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
$ git fhp
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
$ git frp
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_name
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 gcl
When 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 gif