为什么我会收到“提交失败,错误:pathspec ...与任何文件不匹配”? [英] Why am I getting "Commit failed with error: pathspec ... did not match any file(s)"?

查看:636
本文介绍了为什么我会收到“提交失败,错误:pathspec ...与任何文件不匹配”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个存储库,我可以提交任何文件而没有问题。然而,有一个文件'Funder.php',当我尝试提交时,告诉我有一个错误:

 提交失败,错误:
pathspec'application / libraries / Funder.php'与git已知的任何文件都不匹配。

我对此很新颖,所以想知道是否有人可以帮忙?

解决方案

这是您尝试运行时遇到的错误

  git commit< file> 

< file> 还没有尚未上演;换句话说,Git还没有被告知。这很可能是这里发生的事情。运行

  git add application / libraries / Funder.php 

然后尝试提交。


I am having some issues with Git.

I have a repository where I can commit any file to without problem. However, there is a single file 'Funder.php' which, when I try committing, tells me there is an error as:

Commit failed with error:
pathspec 'application/libraries/Funder.php' did not match any file(s) known to git.

I am quite new to this, so was wondering if anybody could please help?

解决方案

This is the error you get when you attempt to run

git commit <file>

but <file> hasn't been staged yet; in other words, Git hasn't been told about it, yet. This is most likely what's happening here. Run

git add application/libraries/Funder.php

then try to commit.

这篇关于为什么我会收到“提交失败,错误:pathspec ...与任何文件不匹配”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆