git - 如何在 github/bitbucket 中提出代码建议?

标签 git github bitbucket

<分区>

当您想对代码提出建议时,您使用什么功能?比方说,其中一位成员认为以另一种方式编写代码的特定部分更好,如果获得批准,那么他/她将实现实际更改?

最佳答案

自2018年10月起,你可以在GitHub上制作“Suggested Changes”:

Collaborators can suggest code changes through inline comments in pull requests, and pull request authors can apply, reject, or edit these suggestions as an integrated part of the code review process.

参见“Applying a suggested change

suggested change

参见 this tweet for illustration .


2018 年 11 月更新:博文“Suggested changes—what we've learned so far”添加:

Since its release, more than 10 percent of all reviewers suggested at least one change, totaling over 100,000 suggestions—and nearly four percent of all review comments created included a suggestion. Based on these early numbers, we see you’re quick to adopt suggested changes and make them a natural part of your code review workflow.

https://user-images.githubusercontent.com/602352/47467407-41a9a980-d7c4-11e8-9374-acb6a7c43b00.png

By far the most frequent requests were:

  • The ability to suggest changes to multiple lines at once.
  • The ability to accept multiple changes in a single commit.

关于git - 如何在 github/bitbucket 中提出代码建议?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27695328/

相关文章:

git - 默认从 git clean 中排除文件

git - 修复 Git 中分离的分支

git - 如何在 git rebase 中查看 'merge conflict' 期间的变化

git - git中神秘消失的分支

Git 删除目录

jenkins - 我们如何将一些数据从 Jenkins 发送回 bitbucket 服务器?

git - 如何通过 Pull Request 执行 git 回滚?

git - 无法在 'Github for Windows' 上登录 Bitbucket

github - 从另一个分支更新 github 分支

git - 从 bitbucket 部署到实时服务器