1. 问题--使用git将代码提交到码云,使用到以下命令时:

git commit -m 'init project'

# 报错 error: pathspec 'project'' did not match any file(s) known to git.

2. 解决方法:将单引号换成双引号就行了

git commit -m "init project"

3.备注:

在Linux系统中,commit信息使用单引号包括,windows系统,commit信息使用双引号。

所以在git bash中git commit -m '提交说明' 这样是可以的,但是在win命令行中就要使用双引号。

git commit 提交不了 error: pathspec 'project'' did not match any file(s) known to git.的更多相关文章

  1. error: pathspec 'master' did not match any file(s) known to git.

    问题描述: 在远程服务器上新建裸仓库git  --bare init : git clone裸仓库到本地: 本地新建并切换分支xccdev,git checkout -b xccdev: 从xccde ...

  2. git——创建分支后,切换分支报错(error: pathspec 'master' did not match any file(s) known to git)

    error: pathspec 'master' did not match any file(s) known to git 解决办法: 1.查看分支 git branch -a 2.获取所有分支 ...

  3. Git使用之(pathspec master did not match any file(s) known to git)

    一 问题概述 今天在工作中遇到一个问题,使用很久的一个local git repository,里面只有develop分支,那么现在想将分支切换到master分支,问题来了,在切换到master分支时 ...

  4. Error: pathspec '*' did not match any file(s) known to git.

    git切换分支报错 error: pathspec 'develop' did not match any file(s) known to git. 解决办法如下: plumm@MACY-PC MI ...

  5. xxx did not match any file(s) known to git

    切换分支的时候,报了标题这么个错误,error: pathspec ''xxx did not match any file(s) known to git. 看见不能切换分支,我首先 git sta ...

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

  7. 规范git commit提交记录和版本发布记录

    在开发过程中我们一般都会用到git管理代码,在git commit提交代码时我们一般对git commit message随便写点简单的描述,可是随着项目参与人数的增多,发现提交的commit记录越来 ...

  8. 如何规范git commit提交

    相信很多人使用SVN.Git等版本控制工具时候都会觉得每次提交都要写一个注释有什么用啊?好麻烦,所以我每次都是随便写个数字就提交了,但是慢慢的我就发现了,如果项目长期维护或者修改很久之前的项目,没有一 ...

  9. git commit 提交失败

    git commit -m 'xxx' 报错 报错信息 当前分支:master 远程分支:gitlib.xxx error: cannot spawn .git/hooks/commit-msg: N ...

随机推荐

  1. Error: Cannot find module 'webpack'错误解决

    $ npm install webpack -g $ npm install webpack-cli -g 全局安装webpack $ npm run dev Error: Cannot find m ...

  2. linux下启动和关闭weblogic(转载)

    在weblogic定义的域中可以找到如下命令: /[youHome]/domains/[yourDomain]/startWebLogic.sh /[youHome]/domains/[yourDom ...

  3. 第 1 章 第 2 题 空间敏感排序问题 位向量实现( bitset位向量 )

    问题分析 在上篇文章中,给出了使用C语言中经典位运算符来实现位向量的方法.而本文,将介绍使用C++中的bitset容器来实现位向量的方法. 实现 // 请包含bitset头文件 #include &l ...

  4. Jquery放大镜插件---imgzoom.js(原创)

    Jquery放大镜插件imgzoom能够实现图片放大的功能,便于与原图进行比较. 使用方法: 1.引入jQuery与imgzoom,imgzoom.css <link rel="sty ...

  5. Java开发面试题

  6. python exception的传递

    try: block except1: except2: ... 如果block中出现了except,那么会先取匹配except1,如果匹配了,进行处理,程序继续执行. 如果except1没有匹配上, ...

  7. docker: Dockerfile命令介绍

    前一章介绍了Dockerfile创建镜像的方法,Dockerfile文件都是一些指令,因此要掌握Dockerfile就必须了解这些指令.这一章就介绍下Dockerfile的指令. From: 功能为指 ...

  8. myeclipse10.0如何集成Git

    现需要给myeclipse10.0集成git工具,经过搜索资料,现整理如下方法: myeclipse10.0对应的Git版本应该为:egit版本为2.3.1 下载地址:http://wiki.ecli ...

  9. PAT天梯赛 L2-027. 名人堂与代金券 【排序】

    题目链接 https://www.patest.cn/contests/gplt/L2-027 思路 在输入的时候 判断分数 是否符合领取代金券条件 如果符合 SUM 就加上对应的代金券价值 然后在对 ...

  10. 灵活使用rewrite

    Nginx提供的全局变量或自己设置的变量,结合正则表达式和标志位实现url重写以及重定向.rewrite只能放在server{},location{},if{}中,并且只能对域名后边的除去传递的参数外 ...