Git出现 fatal: Pathspec 'xxx' is in submodule 解决方案
来源:互联网 发布:空中杀手 知乎 编辑:程序博客网 时间:2024/06/05 07:40
使用Yii Framework进行项目开发,在手动更新vendor的时候发现更新以后无法git add。
更新了七牛的SDK, 目录为vendor/crazyfd/yii2-qiniu, 下面有4个文件,
LICENSE Qiniu.php README.md composer.json
使用git status查看,没有任何提交,后手动删除重新copy了文件,再次使用git status:
modified: vendor/crazyfd/yii2-qiniu (modified content)
git add后只增加了文件夹,但是没有文件。手动Add: git add vendor/crazyfd/yii2-qiniu/Qiniu.php
报出错误信息: fatal: Pathspec 'xxx' is in submodule
解决方案
发现vendor/crazyfd下面并没有.git文件
所以使用下面命令: git rm -rf --cached vendor/crazyfd/yii2-qiniu
git add vendor/crazyfd/yii2-qiniu/*
再次使用git status查看发现文件已经成功添加: Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
deleted: vendor/crazyfd/yii2-qiniu
new file: vendor/crazyfd/yii2-qiniu/LICENSE
new file: vendor/crazyfd/yii2-qiniu/Qiniu.php
new file: vendor/crazyfd/yii2-qiniu/README.md
new file: vendor/crazyfd/yii2-qiniu/composer.json
DONE
- Git出现 fatal: Pathspec 'xxx' is in submodule 解决方案
- Git出现 fatal: Pathspec 'xxx' is in submodule 'module/Cxxx' 异常 解决方案
- git 出现 fatal: Pathspec 'assets/' is in submodule 'public/components/clockpicker',解决方法
- git 出现 fatal: Pathspec 'assets/' is in submodule 'public/components/clockpicker',解决方法是
- git fatal: Path XXX is in submodule XXX
- git fatal: Path '' is in submodule '' 错误
- “fatal: 'git status --porcelain' failed in submodule
- Win7 下 TortoiseGit Commit 时候出现 fatal: pathspec is beyond a symbolic link 已解决
- git 错误解决:fatal: 'git status --porcelain' failed in submodule android_rk/system/core
- git 排错 fatal: 'git status --porcelain' failed in submodule abi/cpp
- git submodule init 出现错误
- android is not translated in xxx解决方案
- git fatal: pathspec 'readme.txt' did not match any files
- git --- fatal: pathspec 'readme.txt' did not match any files
- how to remove submodule in git
- git clone操作出现fatal:index-pack failed错误解决方案
- java出现Resource leak: 'XXX' is never closed 解决方案
- Git Submodule
- 前端-减少页面加载时间的方法
- ubuntu16.04安装 mongodb-linux-x86_64-amazon-3.2.10.tgz
- oracle--预定义异常
- 树状数组求逆序对数板子
- Submit a Spark job to YARN from Java Code
- Git出现 fatal: Pathspec 'xxx' is in submodule 解决方案
- android开发之导入项目慢和中文路径报错
- mysql 5.7.16 x64 位ZIP的安装及服务没有报告任何错误
- laravel生成控制器
- Android 浏览器对 HTML5 的支持情况
- Linux 基本命令学习笔记《三》
- PendingIntent的用法,转载自网络大腿翻译文章
- 用python + openpyxl处理excel(07+)多文档合并+表格合并 + 一些中文处理的技巧
- 几种机器学习模型的基本思路