Visual Studio 2015 社区:通过命令行提交到 github 生成无法访问的文件...? [英] Visual Studio 2015 Community: Commit to github via command line produces inaccessible file...?

查看:28
本文介绍了Visual Studio 2015 社区:通过命令行提交到 github 生成无法访问的文件...?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Github 上创建了一个新的存储库并按照说明进行操作.

I create a new repo on Github and follow the instructions.

然后我打开命令提示符并按照 Github 的说明进行操作.

Then I open Command Prompt and follow Github's instructions.

图片是我得到的...似乎是包含我无法访问的项目的文件.

The picture is what I get...what appears to be file containing my project that is inaccessible.

我做错了什么?

推荐答案

这不是一个无法访问的文件",而是一个嵌套的 git repo.

This is not an "inaccessible file", but a nested git repo.

它作为 gitlink 记录在主 git 存储库(在 GitHub 上发布)中,索引中的特殊条目,并显示为灰色图标.

It is recorded in the main git repo (published on GitHub) as a gitlink, a special entry in the index, and is displayed as a gray icon.

如果您真的想要它的内容,则应该将其转换为子模块.
因此,该 gitlink 指向任何内容,因为无法知道该 repo 的远程 URL(只有它的 SHA1,这是 gitlink 记录的内容)

If you really want its content, you should transform it as a submodule.
As such, that gitlink points to nothing, as there is no way to know the remote url of that repo (only its SHA1 which is what the gitlink records)

这篇关于Visual Studio 2015 社区:通过命令行提交到 github 生成无法访问的文件...?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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