在不同分支上关闭GitHub问题 [英] Closing a GitHub Issue while on a different branch

查看:198
本文介绍了在不同分支上关闭GitHub问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在master 分支上工作。我正在开发一个不同的 newFeature ,它也在github上发布。



我知道如何在处理Master时关闭问题分支:关闭#XXX



然而,这只适用于我在Master分支上工作,如果我切换转到另一个分支或另一个分支,然后使用关闭#XXX 进行提交,它不会解决问题。



我的问题是:
是否可以做到这一点,你是如何做到这一点的?

解决方案

m很确定github问题是不可知的分支。



你是在谈论一个本地分支或跟踪分支?如果你没有专门跟踪github上的分支,分支将不会被推送 - 因此github不会看到你的关闭#XXX 命令。以下是来自progit book的远程分支的一些信息: http://git-scm.com/book/ en / Git-Branching-Remote-Branches



UPDATE



我通过电子邮件将此问题发送给github支持人员,他们证实这是预期的行为。这是我从他们那里得到的答复:


这是因为我们最近做出了一些改变。问题仅在提交合并到存储库的默认分支时才会关闭。我对此感到抱歉。



I am not working on the Master branch. I am working on a different one newFeature , which is also published on github.

I know how to to close issues when working on the Master branch: Closes #XXX.

However this only works when I am working on the Master branch, if I switch over to the other branch or a different one and do a commit with Closes #XXX it does not close the issue.

My question is: Is it possible to do this and how do you do it?

解决方案

i'm pretty sure github issues are agnostic of branches.

are you talking about a local branch or a tracking branch? if your not specifically tracking the branch on github, the branch will not be pushed - thus github will not see your close #XXX command. here's some info on remote branches from the progit book http://git-scm.com/book/en/Git-Branching-Remote-Branches

UPDATE

i emailed this problem to the github support staff and they confirmed this is expected behavior. here's the response i got from them:

It is because of a recent change we made. Issues are only closed when the commits are merged to the default branch of your repository. I am sorry for the confusion.

这篇关于在不同分支上关闭GitHub问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆