gpt4 book ai didi

git - 使用评论中的关键字关闭 github 上的问题

转载 作者:行者123 更新时间:2023-12-05 03:47:43 32 4
gpt4 key购买 nike

我正在尝试使用评论中的关键字关闭我项目中的问题,但它不起作用。我通过命令行尝试了 SourceTree 和 git,结果是一样的。我尝试了以下选项:关闭 #1、关闭 #1 并修复 #1。

例如:

git commit -am "close issue fixes #1"

我在一个分支上工作,而不是在 master 上工作。是否应该在 GitHub 存储库中配置某些内容?

最佳答案

来自GitHub documentation :

You can also use closing keywords in a commit message. The issue will be closed when you merge the commit into the default branch, but the pull request that contains the commit will not be listed as a linked pull request.

如果您不将提交 merge 到默认分支,那么 GitHub 不会关闭它。那是因为您可能决定不喜欢该更改并希望以不同的方式解决问题,因此仅使用关键字推送提交是不够的。

关于git - 使用评论中的关键字关闭 github 上的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64776195/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com