Pull requests in TFS 2013 and Visual Studio Online

A few days ago Visual Studio and TFS 2013 Update 4 CTP1 was announced.  One of the major features included in this update is the ability to perform Pull Requests when using Git.

This is a very important Git feature and it is great to see it making its way to TFS on-premises.  This feature has been available in Visual Studio Online since June and you can see a great write up about how to use it on the Microsoft ALM blog.

Pull requests are used to tell your team that you have changes that you’d like to merge to a branch.  Once you push your changes to your own branch on the server, the team is notified so they can review the changes.  If the reviewers agree that the change looks correct, they will approve it and the change is merged.  If you are thinking that this sounds very similar to a Code Review, it’s because that’s what you would use it for. 

This is the process that you should follow to successfully complete a Pull Request and successfully merge your code:

  • From Visual Studio, create a local branch and commit your changes to it
  • Publish your branch to the server
  • From the Web Portal, create a Pull Request – specify a name, description, and reviewers
  • Reviewers add comments to the code diffs and to the pull request – “A single approval is sufficient to approve the pull request. A single rejection overrides all approvals and causes the status to be rejected. When you approve or reject the pull request, team members are alerted if they have subscribed to alerts.”
  • Once everyone agrees that the change should be merged, you can merge it right from your web browser
  • Delete your branch

If you want to get started with Git and be successful with it, while staying in Visual Studio, I created a Pluralsight course that you may want to check out: Git for Visual Studio Developers.

About esteban

Esteban is the Founder and Chief Technologist at Nebbia Technology, an ALM consulting and Azure-powered technology company. He is a software developer with a passion for ALM, TFS, Azure, and software development best practices. Esteban is a Microsoft Visual Studio ALM MVP and ALM Ranger, Pluralsight author, and the president of ONETUG (Orlando .NET User Group).

Leave a Reply

Your email address will not be published. Required fields are marked *

Are you human? *