一、代码提交命令

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相关推荐

  1. 解决使用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 ...

  2. 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 ...

  3. 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 ...

  4. windows常用dos(cmd)命令

    windows常用dos(cmd)命令.md 参考网址: https://mp.weixin.qq.com/s/DJMGUmw8hPMkWMEbj4KVIg 前言 最近一直在Windows下操作,但与 ...

  5. 【038】使用git commit命令时遇到 fatal: Unable to create index.lock File exists 错误的解决办法

    一.问题描述 使用git commit 命令提交代码,遇到下面的错误: $ git commit -m 'Test' fatal: Unable to create 'D:/MyProject/.gi ...

  6. react 项目根据git commit记录自动生成CHANGELOG.md文档

    前言 本文基于 "conventional-changelog": "^3.1.25" "conventional-changelog-cli&quo ...

  7. 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 ...

  8. Git:错误:error:src refspec master does not match any

    新建立了一个远程仓库,想着把项目放上去.于是在项目目录上: git init 然后就添加远程库 git remote add origin xxxx.git 然后就想push: git push -u ...

  9. 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 ...

最新文章

  1. 算法 - 时间复杂度
  2. CODING 最佳实践:快课网研发效能提升之路
  3. 简单的c语言课程设计管理类,C语言课程设计-学生成绩简单管理程序.doc
  4. poj 1324(BFS+状态压缩)
  5. Winxp中加密自己的用户目录
  6. 初学者选黑卡还是微单_零基础,一篇读懂单反和微单
  7. es6学习笔记-顶层对象_v1.0_byKL
  8. 蓝桥杯:十六进制转八进制
  9. C 标准库 —— stdio.h
  10. 一文详解双目视觉目标检测
  11. Python_装饰器精讲_33
  12. m3000服务器维修,陕汽德龙新M3000,仪表上有个故障灯,红颜色⭕里有个❌是个什么故障灯了...
  13. 如何修复iTunes中未显示的iPhone或iPad
  14. 通过这18000个Python项目对比,并从中精选出 45 个值得学习的!
  15. Android音视频开发学习
  16. 几个在线的维恩图制作站点
  17. 咸阳无房证明网上办理指南
  18. 提笔忘字低龄化 电脑难辞其咎
  19. [ERROR] Couldn‘t set the case sensitive attribute of the directory “\\?\C:\WSL\“.Reason: Indicates
  20. nodejs crud功能(orm 七牛 mysql..)

热门文章

  1. 单元测试工具 unitils
  2. SecureCRT无法使用root账户远程连接ubuntu
  3. android app resign之后安装提示INSTALL_PARSE_FAILED_NO_CERTIFICATES的解决办法
  4. Flex及AIR开发资源集合
  5. vj p1025题解
  6. Vue 学习笔记(3)路由的基本使用 结合 SpringBoot
  7. 【恋上数据结构】串匹配算法(蛮力匹配、KMP【重点】、Boyer-Moore、Karp-Rabin、Sunday)
  8. 软件设计师17-网络基础知识
  9. 查看Windows系统的开机、关机时间、开机时长等信息
  10. eclipse启动报错 Java was started but returned exit code=13 解决方法