What I Like Most about Git and Code Review


We have switched from SVN to Git for nearly a month and things change very differently. Here are the things I love most about using git and code review.

distributed branches

As we know, the git is a distributed code repo. A branch is very lightweight in git (in SVN, creating and deleting branches are just way too much work). Using git, I can switch between branches very easily (git branch and git checkout). I can stash my work if they are not finished. That means I can work on several bug fixes in parallel.

PS: you can still work if the code server is offline. Since you can work and commit the changes locally and push them once the server is back online. But for SVN, as soon as the server is disconnected, you can’t basically collaborate.

vsonline-git What I Like Most about Git and Code Review code review git SVN visual studio online

vsonline-git

Code Review

The Visual Studio Online integrates the code review into the pull request. By default, you cannot merge your changes to the develop branch (similar to the trunk in SVN). Instead, you create a new branch and push remotely, create a pull request to merge into develop. Before a pull request is completed, you can enforce a policy that the code must be reviewed by at least e.g. 2 other developers (peer review). And also, the code must not break the compiler or break the unit tests. All these become so much more natural and easy using git/VSO instead of SVN.

pull-request-code-review What I Like Most about Git and Code Review code review git SVN visual studio online

pull-request-code-review

Code review is an useful and important method to greatly reduce the number of code errors in the first place since the developers might be having really bad moods some day.

–EOF (The Ultimate Computing & Technology Blog) —

GD Star Rating
loading...
437 words
Last Post: Software Review: Crystal Disk Info - the HardDisk Viewer
Next Post: Visual Studio Online - A Couple of Tips

The Permanent URL is: What I Like Most about Git and Code Review

Leave a Reply