Git: fatal: Pathspec is in submodule
出现是问题:
git提交代码是出现fatal: Path 'directory/file' is in submodule 'directory''错误
Removing the directory from git and adding it again worked for me: git rm --cached directory
git add directory This works if you purposefully removed the .git directory because you wanted to add directory to your main git project. In my specific case, I had git cloned an extension and ran git add . without thinking too much. Git decided to create a submodule, which I didn't like. So I removed directory/.git and ran into Git: fatal: Pathspec is in submodule. I couldn't find out how to remove the submodule stuff. Fixed with the two lines above.
Git: fatal: Pathspec is in submodule的更多相关文章
- git fatal: Path 'XXX' is in submodule 'XXX'错误
easyswoole项目的 vendor/easyswoole/socket/这个项目怎么都无法添加到git目录里面. 报错: Administrator@PhpServer MINGW64 /z/w ...
- git rm–r folder fatal:pathspec "" did not match any files
问题描述: 某年某月某日,在查看git库的时候,发现文件的分布和文件夹的名字是极其不合理的,所以移动和重命名了某些文件. 在删除(git rm –r folder)一个空文件夹的时候,出现错误:fat ...
- Git无法删除文件问题:fatal: pathspec 'readme.txt' did not match any files
在使用Git时,不小心创建了一个不需要的文件,想要删除一个文件时,出现了错误: fatal: pathspec 'readme.txt' did not match any files 原因是新建的这 ...
- git 添加add readme.txt 报fatal: pathspec 'readme.txt' did not match any files错误
刚刚接触git版本管理器,跟着廖雪峰老师的git教程学习,在创建一个新的文件时,使用的是$ git add readme.txt指令,但是报出fatal: pathspec 'readme.txt' ...
- git fatal: remote origin already exists. 报错解决
在研究git的时候,随便输了个 git remote add origin xxx; 然后再真正add 远程仓库的时候,报了git fatal: remote origin already exist ...
- 【Git】git clone报错 git fatal: Unable to find remote helper for 'https'
[参考资料] https://stackoverflow.com/questions/8329485/unable-to-find-remote-helper-for-https-during-git ...
- Git出现 fatal: Pathspec 'xxx' is in submodule 'xxx' 异常的解决方案
今天在使用git的时候,发现无论怎么改.gitignore文件都无法添加文件到版本控制,最后发现是缓存的原因,需要删除缓存再重新add git rm -rf --cached xxx
- git中报错---fatal: pathspec 'readme.txt' did not match any files
1.git安装 git官网下载最新版本,一键安装或custom install. 2.会弹出一个类似的命令窗口的东西,就说明Git安装成功. 3.安装完成后,还需要最后一步设置,在命令行输入如下--- ...
- 解决git add README.md 时报错 fatal: pathspec 'README.md' did not match any files
解决办法一: 直接在远程仓库创建然后在本地$ git pull origin master 解决办法二: 换成$ touch README.md在本地创建修改后再commit push上去
随机推荐
- leetcode Roman Integer
class Solution { public: int romanToInt(string s) { if (s.length() < 1) return 0; map<char,int ...
- win8 中如何删除 共享文件夹 用户名和密码
在访问共享文件夹时我们都喜欢选中记住用户名和密码,可是有时候密码输入错误或者密码修改了,这时就需要我们删除或则修改先前记住的用户名和密码记录. 首先进入:控制面板\所有控制面板项\凭据管理器 选择wi ...
- Leetcode-841. 钥匙和房间
题目 有 N 个房间,开始时你位于 0 号房间.每个房间有不同的号码:0,1,2,...,N-1,并且房间里可能有一些钥匙能使你进入下一个房间. 在形式上,对于每个房间 i 都有一个钥匙列表 room ...
- 《JavaScript语言精粹》笔记
0.JavaScript的简单数据类型包括数字.字符创.布尔值(true/false).null和undefined值,其它值都是对象. 1.JavaScript只有一个数字类型,它在内部被表示为64 ...
- RecyclerView的使用(2)之多Item布局的载入
原创文章,转载请注明 http://blog.csdn.net/leejizhou/article/details/50708349 李济洲的博客 上一篇介绍的了RecyclerView的基础使用ht ...
- Github用.gitignore忽略指定文件
.gitignore Github提供.gitignore这种功能,可以自己指定哪些文件可以不被管理.具体方法是在版本管理的根目录下(与.git文件夹同级)创建一个.gitignore. 应用实例 项 ...
- windows 查看动态连接库和静态连接库的方法
在window下查看动态库的导出函数可以用vs自带的Dependenc工具: 查看静态库的信息要用命令行来实现: dumpbin /LINKERMEMBER Test.lib > ...
- rabbitMQ在linux上安装
语言环境安装 一.编译安装方式 1.依赖环境的安装-如果需要用编译安装erlang语言环境,需要安装C++编译. yum -y install make gcc gcc-c++ kernel-deve ...
- (C++)字符串分割
题目: 如何对C++中输入的字符串进行分割呢?如“I am a student”,去除空格后分割成为“I”,“am”, “a”, “student”四个单词 思路: 直接参考代码 代码: void s ...
- Oracle 之 保留两位小数
项目需要使用百分率,保留2位小数,只用 round 和 trunc 函数都可以实现(round(_data,2) ),只是格式不是很工整,对格式要求不严谨的情况下使用 round 即可. 以下是比较方 ...