内容简介:删除隐性的git submodule(金庆的专栏 2018.8)正常的submodule会在 .gitmodule 文件中,TortoiseGit 会有 Submodule Update 菜单。
删除隐性的git submodule
(金庆的专栏 2018.8)
正常的submodule会在 .gitmodule 文件中,TortoiseGit 会有 Submodule Update 菜单。
还有一种隐性的 submodule, .gitmodule 文件中看不到它,无法 update.
golang开发中的vendor目录下经常会不小心添加一个带 .git 的目录,就变成了一个假的submodule.
用 Repo-browser 看这个目录是个submodule链接, clone 出来就只有一个空目录。
删除这个submodule不能用 git delete, 提交时会报错:
git.exe add -f [...] fatal: pathspec 'src/vendor/github.com/grpc-ecosystem/grpc-opentracing' did not match any files git did not exit cleanly (exit code 128)
git delete 父目录也无法提交。
但是可以直接删除(不用git delete), 然后提交并Push. 好像只有这个办法。
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:- JavaScript 隐性类型转换步骤浅析
- PHP数据类型隐性转换的陷阱
- BUF早餐铺丨安全研究人员玩上怀旧梗:“邪恶大眼夹”可帮助隐性感染Office文档;中消协等发智能锁试...
- MySQL删除操作其实是假删除
- C++拾趣——STL容器的插入、删除、遍历和查找操作性能对比(Windows VirtualStudio)——删除
- 我用 Python 找出了删除我微信的所有人并将他们自动化删除了
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Algorithms Unlocked
Thomas H. Cormen / The MIT Press / 2013-3-1 / USD 25.00
Have you ever wondered how your GPS can find the fastest way to your destination, selecting one route from seemingly countless possibilities in mere seconds? How your credit card account number is pro......一起来看看 《Algorithms Unlocked》 这本书的介绍吧!