Now that TFS 2013 supports git natively, how does one go about implementing a pull request policy / workflow - that is, mandating pull requests and code reviews to get code merged in?
To create a pull request: In the Git menu, select Manage Branches. Right-click a branch and select Create Pull Request. Edit the source and target branches as needed, enter a title and optional description, and select Create.
Microsoft has documented: Git is the default version control provider for new projects.
VS Code allows you to do Pull Requests directly from the editor. To do that you need to be on the GitHub Pull Request page. Click on the create new pull request button. Then choose a target branch to which you want to pull, and from which you want to pull.
Pull requests are now supported in both TFS 2013 update 4 and in Visual Studio Online. Combined with removing the Push permission to certain branches, this effectively allows you to setup a policy.
For more advanced policy like features, you can use the ISubscriber interface to build a 'commit hook' until Microsoft fully implements such features. Read more here.
More information on Pull Requests can be found in this blog post from the Visual Studio team.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With