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上去 
随机推荐
- Poly2Tri介绍[转]
			https://blog.csdn.net/xys206006/article/details/83002326 这是Poly2Tri介绍的翻译博文.原文链接:http://sites-final.u ... 
- Jetpack 架构组件 Lifecycle 生命周期 MD
			Markdown版本笔记 我的GitHub首页 我的博客 我的微信 我的邮箱 MyAndroidBlogs baiqiantao baiqiantao bqt20094 baiqiantao@sina ... 
- Android教材 | 第三章 Android界面事件处理(一)—— 杰瑞教育原创教材试读
			前 言 JRedu Android应用开发中,除了界面编程外,另一个重要的内容就是组件的事件处理.在Android系统中,存在多种界面事件,比如触摸事件.按键事件.点击事件等.在用户交互过程中, ... 
- Dll 导出函数那些破事
			经常使用VC6的Dependency查看DLL导出函数的名字,会发现有DLL导出函数的名字有时大不相同,导致不同的原因大多是和编译DLL时候指定DLL导出函数的界定符有关系. VC++支持两种语言:即 ... 
- Windows10 安装Jupyter
			官方文档:https://jupyter-notebook.readthedocs.io/en/stable/ https://github.com/jupyter/jupyter/wiki/A-ga ... 
- windows无法访问vmware搭建好虚拟机linux web服务器
			[前置条件] vmware搭建好虚拟机web服务器 ,但是本机就是无法访问的解决办法. linux虚拟机的网络选择Bridged 桥接到本机网卡. 具体情况如下 : 1.本机能ping通虚拟机 2.虚 ... 
- [Algorithm] Check for balanced parentheses using stack
			Algorithm or program to check for balanced parentheses in an expression using stack data structure. ... 
- [Canvas]动态背景
			欲查看动态效果请点击下载代码再用Chrome或Firefox打开index.html 图例: 代码: <!DOCTYPE html> <html lang="utf-8&q ... 
- PowerDesigner设计的数据库 ORA-0092
			异常 数据库由Powerdesigner设计,格式为Oracle10g,由Powerdesigner生成的数据库并没报什么异常,使用navicat也能正常操作,而使用PLSQL Developer去出 ... 
- 使用visual studio code调试php代码
			这回使用visual studio code折腾php代码的调试,又是一顿折腾,无论如何都进不了断点.好在就要放弃使用visual studio code工具的时候,折腾好了,汗~ 这里把步骤记录下来 ... 
