Git“NO-HEAD”语句
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14896533/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Git "NO-HEAD" statement
提问by Cemre
I am using EGit plugin for Eclipse but whenever I add my project to Git, the plugin puts a "NO-HEAD" indication next to my project folder in Eclipse directory view. Am I doing something wrong ? What does this mean ?
我正在为 Eclipse 使用 EGit 插件,但是每当我将我的项目添加到 Git 时,该插件都会在 Eclipse 目录视图中我的项目文件夹旁边放置一个“NO-HEAD”指示。难道我做错了什么 ?这是什么意思 ?
回答by VonC
It can simply mean that, until you make your first add and first commit, you have no branch (not even a master
one), hence no HEAD
referencing any branch.
它可以简单地表示,在您进行第一次添加和第一次提交之前,您没有分支(甚至没有分支master
),因此没有HEAD
引用任何分支。
See more in "Why do I need to explicitly push a new branch?".
请参阅“为什么我需要明确推送新分支?”。