How to close a GitHub pull request with a commit message?

偶尔善良 提交于 2019-12-01 15:08:24

You probably want to look at this GitHub help page. It says:

You can use any of the following keywords to close an issue via commit message:

  • close
  • closes
  • closed
  • fix
  • fixes
  • fixed
  • resolve
  • resolves
  • resolved

So "Fixes #123" or "Resolved #456" will work. All pull requests are mapped as issues, so this will works for pull requests too.

Note: you'll see a message about unmerged commits because you amended the pull request. So looking at the pull request, it won't be immediately obvious that the PR was incorporated (versus just plain closed) unless you put something meaningful in the first line of the commit message so you can see the message in the pull request.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!