如何判断github提交的是哪个分支? [英] How to tell which branch a github commit was for?

查看:112
本文介绍了如何判断github提交的是哪个分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在github上,当我查看提交时,它会显示提交消息和更改以及底部的任何注释。但是,它并不告诉我该提交被签入了哪个分支。即使我浏览代码,它也浏览了特定树的代码(大概是提交时的代码状态),而不是特定的分支。

On github, when I view a commit, it shows me the commit message and the changes, along with any comments at the bottom. However, it doesn't tell me what branch the commit was checked in to. Even if I 'Browse Code', it is browsing the code for a particular 'tree' (presumably the state of the code when the commit was made), rather than for a particular branch.

我知道在git中的提交并没有内在地链接到一个分支,但是它们肯定会始终首先被提交到一个特定的分支中。是不是提交标记了该分支,我可以查看它是哪个分支吗?

I know that commits in git aren't intrinsically linked to a branch, but surely they are always going to be first committed into a particular branch? Isn't the commit tagged with that branch, and can I view which branch it was somehow?

推荐答案

好的,答案这个问题从根本上说是:没有确切的方法来说明。 Mercurial实际上标签提交他们被检入的分支的名字,但git根本没有;显然,这个分支的名字并不重要。这是一个设计决定,它看起来不会改变。

OK, the answer to this question, fundamentally, is: there is no definitive way to tell. Mercurial actually tags commits with the name of the branch they were checked in to, but git simply doesn't; apparently, it isn't considered important what the name of the branch was. This was a design decision and it doesn't look like it's going to change.

这篇关于如何判断github提交的是哪个分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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