与git已知的任何文件都不匹配

与git已知的任何文件都不匹配

本文介绍了git commit错误:pathspec'commit'与git已知的任何文件都不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将Ruby应用上传到Heroku。我从 git init 开始,然后键入 git add。,然后使用 git commit -m初始提交

I am trying to upload a Ruby app to Heroku. I start with git init and then I type git add . and then I use git commit -m initial commit.

每当我使用 git commit -m 时,我都会收到一条错误消息:

Whenever I use git commit -m, I receive an error message saying:

我被告知这是由于参数顺序错误而发生的。

I have been told that this is happening because the arguments are in the wrong order.

我注意到的是,当我使用 git add时。不会列出正在添加的文件因为它只会转到下一行。

The thing I noticed is that when I use git add . it will not list the files that are being added because it will just go to the next line.

我怀疑我遇到了这个问题,因为我的文件没有真正添加。

I suspect that I am having this problem because my files are not really being added.

我将不胜感激有关如何解决此问题的任何建议。

I would appreciate any advice about how to correct this problem.

推荐答案

命令行参数之间用空格分隔。如果要在参数中添加空格,则应将其引号。因此,使用 git commit -m初始提交

The command line arguments are separated by space. If you want provide an argument with a space in it, you should quote it. So use git commit -m "initial commit".

这篇关于git commit错误:pathspec'commit'与git已知的任何文件都不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 08:25