Code Review, refers to code review; scenario: a new person or junior engineer makes some changes, but needs to be confirmed by an experienced programmer before adding them to the main branch or feature branch; is it impossible to let an experienced programmer sit next to you and look at the code? This is such a waste of time;
For example: Project A has two branches master分支和dev分支;现在公司在开发,所有人完成任务,都应该把分支合并至devbranch;
Zhang San used his own local development environment, based on the dev分支,创建zhang_san branch; it took him three days to complete a function;
The old programmer felt that Zhang San was a novice, so he put his changes directly into the dev branch; he asked Zhang San to apply for Merge and let him dev分支;就让张三提个Merge申请,让他Code Review ;
So Zhang San branched his zhang_san分支提到远程服务器上,操作“New Merge Request”,发起一个Merge请求,将zhang_san合并至dev and designated the reviewer to be an old programmer;
The old programmer found some free time to check this Merge Request and felt there was something wrong, so he made some suggestions (the suggestions will be automatically sent to the relevant email address of the relevant person);
Zhang San later checked the suggestions made by the old programmer through his email, and branched them locally zhang_san进行了修改,并git push至远程zhang_san;
The "Merge Request" at this time will update the latest Commit;老程序员再看这次总的改动,发现不错,挺好的,点击确认请求后,就成功将zhang_san分支上的改动合并至dev branch; [The Code Review is completed now]
Zhang San was very happy to know through email that his branch had been merged into the development branch dev; he could delete the local zhang_san branch and the remote zhang_san Branch and keep the branch clean; you can also continue to do new development in the zhang_san branch, submit a new Merge_Request, and conduct a new round of dev很开心;可以删除这个本地zhang_san分支和远程zhang_san分支,保持分支干净;也可以继续在zhang_san分支做新的开发,提交新的Merge_Request,进行新一轮的Code Review.
Code review, generally large companies require code review. If there is a problem with the code or it does not meet the specifications, modify it correctly before going online.
Code Review
, refers to code review; scenario: a new person or junior engineer makes some changes, but needs to be confirmed by an experienced programmer before adding them to the main branch or feature branch; is it impossible to let an experienced programmer sit next to you and look at the code? This is such a waste of time;For example:
Project A has two branches
master
分支和dev
分支;现在公司在开发,所有人完成任务,都应该把分支合并至dev
branch;Zhang San used his own local development environment, based on the
dev
分支,创建zhang_san
branch; it took him three days to complete a function;The old programmer felt that Zhang San was a novice, so he put his changes directly into the
dev
branch; he asked Zhang San to apply forMerge
and let himdev
分支;就让张三提个Merge
申请,让他Code Review
;So Zhang San branched his
zhang_san
分支提到远程服务器上,操作“New Merge Request”,发起一个Merge
请求,将zhang_san
合并至dev
and designated the reviewer to be an old programmer;The old programmer found some free time to check this
Merge Request
and felt there was something wrong, so he made some suggestions (the suggestions will be automatically sent to the relevant email address of the relevant person);Zhang San later checked the suggestions made by the old programmer through his email, and branched them locally
zhang_san
进行了修改,并git push
至远程zhang_san
;The "Merge Request" at this time will update the latest
Commit
;老程序员再看这次总的改动,发现不错,挺好的,点击确认请求后,就成功将zhang_san
分支上的改动合并至dev
branch; [The Code Review is completed now]Zhang San was very happy to know through email that his branch had been merged into the development branch
dev
; he could delete the localzhang_san
branch and the remotezhang_san
Branch and keep the branch clean; you can also continue to do new development in thezhang_san
branch, submit a newMerge_Request
, and conduct a new round ofdev
很开心;可以删除这个本地zhang_san
分支和远程zhang_san
分支,保持分支干净;也可以继续在zhang_san
分支做新的开发,提交新的Merge_Request
,进行新一轮的Code Review
.code review is code review, you can search on Baidu, there are many articles
Others will read the code you write, and you will also read other people’s code
The review is over and will be online again
Code review, generally large companies require code review. If there is a problem with the code or it does not meet the specifications, modify it correctly before going online.
Three thousand lives lost: pitfalls in the old code