简体   繁体   English

在 git 中的代码审查后更改分支

[英]Making changes to branch after code review in git

I have a branch feature/my-changes which I have made changes to.我有一个分支feature/my-changes ,我已经对其进行了更改。 I pushed these changes, created a pull request, and have gotten feedback on my changes through a code review.我推送了这些更改,创建了一个拉取请求,并通过代码审查获得了关于我的更改的反馈。 My question is: Now that I see the changes I need to make in github (from code review comments), do I simply go back to my code editor and make those changes in my branch, make a new commit, and push again?我的问题是:现在我看到了我需要在 github 中进行的更改(来自代码审查评论),我是否只需将 go 返回到我的代码编辑器并在我的分支中进行这些更改,进行新的提交,然后再次推送? Or should I be "checking out" a revision of my branch's history and make edits there?还是我应该“检查”我的分支历史的修订版并在那里进行编辑? I'm not really sure how to proceed after this code review...在此代码审查之后,我不确定如何继续...

The usual way to deal with this is checking out the branch feature/my-changes , then make the changes according to the review comments, create a new commit and push your branch.处理这个问题的常用方法是检查分支feature/my-changes ,然后根据评论进行更改,创建一个新的提交并推送你的分支。

Yes.Since you have not yet merged the branch (also if it is merged) you can clearly make changes in the same branch and then commit and you can use the same Pull Request again for Review and merge.是的。由于您尚未合并分支(如果已合并),您可以清楚地在同一分支中进行更改然后提交,您可以再次使用相同的拉取请求进行审核和合并。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM