删除隐性的git submodule

栏目: 编程工具 · 发布时间: 7年前

内容简介:删除隐性的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. 好像只有这个办法。


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Introduction to the Design and Analysis of Algorithms

Introduction to the Design and Analysis of Algorithms

Anany Levitin / Addison Wesley / 2011-10-10 / USD 117.00

Based on a new classification of algorithm design techniques and a clear delineation of analysis methods, Introduction to the Design and Analysis of Algorithms presents the subject in a coherent a......一起来看看 《Introduction to the Design and Analysis of Algorithms》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

SHA 加密
SHA 加密

SHA 加密工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换