In the 10 June update of Visual Studio Online the Review and Merge code with Pull Requests feature was added. This means code review for GIT is finally here.
Prepare for code review
We use SourceTree with GitFlow. I’ve created a New Feature that I want to get code reviewed. Important is the created branch.
After completing my coding I need to publish my branch with the commits.
Request code review
After I published the branch opened a browser to visualstudio.com > CODE > Pull Requests and created a New Pull Request. I’ve selected the feature branch and more options to select the team members. With Create Pull Request the request is created.
With ping I send an e-mail to the reviewer. For this post I am my own reviewer 😉
Code review
On the main screen of the pull request I can add some general comments / discussion.
In the source(s) I can add more detailed comments linked to lines of code. These comments are visible under the source file in the treeview on the left as well.
Approve and merge
Since I’m happy with my own code, I’ll give a thumbs up and approve the code.
With the approval of myself 🙄 I can merge the feature branch to the original branch.
References
Conduct a Git pull request on Visual Studio Online(more detail)