Recently we had a discussion when you should do a code review when using GIT. As a general rule you should do code review often.There are two ways to do code review with GIT.
Hope you like it. Stay tuned for the more!.
1) Classic way:
We all know that GIT is known for it's feature branch features. So each developer working on some feature should have created feature set. That features branch is accessible to all the peers working on same project. So when developer completes his changes and push to feature branch anybody from his/her peers can checkout branch and perform code review. The problem with this method is we don't have any records for the code review in source control it self.
2) Integration Way:
This is best method for doing code review. As we all know GIT provides pull request feature. So we will have two type of branches one is master branch for project and another feature branches for each developer working on different features of project. So now once a developer completes his feature and feels that its ready to push developer will send a pull request to master branch. Now the person or lead who are managing master branch will perform a review of pull request and either accept pull request and merged into code or if he found a some issue with code he can also reject pull request also with proper comments. So here we can easily perform code review with GIT and all data remains same. Most of the open source project on Github maintained this way only.
Hope you like it. Stay tuned for the more!.
0 comments:
Post a Comment
Your feedback is very important to me. Please provide your feedback via putting comments.