windows的dos(cmd)下使用git commit出现error: pathspec readme.md did not match any file known to git
一、代码提交命令
git commit -m [message] # 提交暂存区到仓库区
二、message与空格的秘密
1 执行正常:message中无
空格,如下:
git commit -m 'readme.md' # 单引号
git commit -m "readme.md" # 双引号
2 执行错误:message中
有空格,如下:
git commit -m 'add readme.md' # 单引号
但,单引号变双引号后
git commit -m "add readme.md" # 双引号
执行正常!
总结
若message
中有空格时,使用单引号会报错,请务必使用双引号!
windows的dos(cmd)下使用git commit出现error: pathspec readme.md did not match any file known to git相关推荐
- 解决使用git时候出现的“error pathspec ‘“xx文件“did not match any file(s) known to git”错误
这次分享一个关于我在使用git时候出现的一个错误. 错误信息: error pathspec "xx文件" did not match any file(s) known to g ...
- git切换分支报错:error: pathspec 'origin/XXX' did not match any file(s) known to git
项目上有一个分支test,使用git branch -a看不到该远程分支,直接使用命令git checkout test报错如下: error: pathspec 'origin/test' did ...
- git切换分支报错:error: pathspec 'origin/XXX' did not match any file(s) known to git.
项目上有一个分支testGit,使用Git branch -a看不到该远程分支,直接使用命令git checkout testGit报错如下: error: pathspec 'origin/test ...
- windows常用dos(cmd)命令
windows常用dos(cmd)命令.md 参考网址: https://mp.weixin.qq.com/s/DJMGUmw8hPMkWMEbj4KVIg 前言 最近一直在Windows下操作,但与 ...
- 【038】使用git commit命令时遇到 fatal: Unable to create index.lock File exists 错误的解决办法
一.问题描述 使用git commit 命令提交代码,遇到下面的错误: $ git commit -m 'Test' fatal: Unable to create 'D:/MyProject/.gi ...
- react 项目根据git commit记录自动生成CHANGELOG.md文档
前言 本文基于 "conventional-changelog": "^3.1.25" "conventional-changelog-cli&quo ...
- Git——git push 错误[error: src refspec master does not match any]解决方案
问题描述 git push -u origin master error: src refspec master does not match any error: failed to push so ...
- Git:错误:error:src refspec master does not match any
新建立了一个远程仓库,想着把项目放上去.于是在项目目录上: git init 然后就添加远程库 git remote add origin xxxx.git 然后就想push: git push -u ...
- Git 报错 error: pathspec ‘XXX‘ did not match any file(s) known to git 报错解决方法
问题复现 : ① 在本地分支切换到同事新创建的分支: git checkout xxx ② 报错: error: pathspec 'XXX' did not match any file(s) kn ...
最新文章
- 算法 - 时间复杂度
- CODING 最佳实践:快课网研发效能提升之路
- 简单的c语言课程设计管理类,C语言课程设计-学生成绩简单管理程序.doc
- poj 1324(BFS+状态压缩)
- Winxp中加密自己的用户目录
- 初学者选黑卡还是微单_零基础,一篇读懂单反和微单
- es6学习笔记-顶层对象_v1.0_byKL
- 蓝桥杯:十六进制转八进制
- C 标准库 —— stdio.h
- 一文详解双目视觉目标检测
- Python_装饰器精讲_33
- m3000服务器维修,陕汽德龙新M3000,仪表上有个故障灯,红颜色⭕里有个❌是个什么故障灯了...
- 如何修复iTunes中未显示的iPhone或iPad
- 通过这18000个Python项目对比,并从中精选出 45 个值得学习的!
- Android音视频开发学习
- 几个在线的维恩图制作站点
- 咸阳无房证明网上办理指南
- 提笔忘字低龄化 电脑难辞其咎
- [ERROR] Couldn‘t set the case sensitive attribute of the directory “\\?\C:\WSL\“.Reason: Indicates
- nodejs crud功能(orm 七牛 mysql..)
热门文章
- 单元测试工具 unitils
- SecureCRT无法使用root账户远程连接ubuntu
- android app resign之后安装提示INSTALL_PARSE_FAILED_NO_CERTIFICATES的解决办法
- Flex及AIR开发资源集合
- vj p1025题解
- Vue 学习笔记(3)路由的基本使用 结合 SpringBoot
- 【恋上数据结构】串匹配算法(蛮力匹配、KMP【重点】、Boyer-Moore、Karp-Rabin、Sunday)
- 软件设计师17-网络基础知识
- 查看Windows系统的开机、关机时间、开机时长等信息
- eclipse启动报错 Java was started but returned exit code=13 解决方法