English 中文(简体)
git子模块更新在一台机器上出现错误,但在另一台机器上工作
原标题:git submodule update fails with error on one machine but works on another machine

我创建了一个it子,并将其推到我们的主要存放处。 这一工作很出色,我可以通过浏览器在存放处看到分层。

To test it I tried to get the source in a fresh build tree. First I ran git submodule init and then git submodule update <submodule-name>.

第二项指挥失误:

error: pathspec  x/mypkg  did not match any file(s) known to git. Did you forget to  git add 

我试图在<代码>上添加“gitmodules”。 the ur

最佳回答

这可能是因为你或你的团队中的人改变了尚未出版的分层(但并未推向遥远的服务器)。 然后,他们公布了超级项目,其中提到在电梯服务器上不存在的分层承付金。 So git正在试图 down开一个能够发现的具体子模块。

如果这些改动是在你的机器或另一机器的存放处。

为了解决这一存放处的问题,提供并公布对服务器进行分层改动的参考资料。 或者将分单元改为另一单元。

问题回答

我在试图<>更新指数中标注的子模块时,也收到了这一错误。 这就是说,它们存在于<代码>.gitmodules中,但并未正确地添加到存放处。

解决办法是使用<代码>.gitmodules具体规定的道路人工再加。 您可使用“TortoiseGit UI”或将这一系统放在每个单元的指挥线上......

git submodule add <url> <path>

“Re-adding

(实现这一点可能不是原始海报的解决办法,但希望能帮助其他人) 选择这一点:

为了将新的子模块输入其他储存库,我认为,在开始运行<条码>/代码>之前,你需要管理<条码>git submodule init;这将在<条码>.git/config上登记新的分册。

I was trying this, which was giving error:

git submodule update --init –recursive 

为此,我进行了尝试,并为我工作:

git submodule update --init 




相关问题
git confusion - cloning a repo is returning a past version

Im having some confusion with my git usage. I cloned a repo from one comp to the other, and the new clone is the state of the original that was active some time ago. So its cloning a past version. ...

Appropriate strategy for tagging and hotfixing with git

I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

Using Git in a TFS shop

Using Git at home has spoiled me - I now find using TFS at work to be a bit of a drag and want to explore the possibility of using Git locally and syncing somehow with TFS. I figure there are a few ...

热门标签