git commit error: pathspec 'commit' did not match any file(s) known to git


I am trying to upload a Ruby app to Heroku.我正在嘗試將 Ruby 應用程序上傳到 Heroku。 I start with git init and then I type git add .我從git init開始,然後輸入git add . and then I use git commit -m initial commit .然後我使用git commit -m initial commit

Whenever I use git commit -m , I receive an error message saying:每當我使用git commit -m ,都會收到一條錯誤消息:

git commit error:pathspect 'commit' did not match any file(s) known to git. git commit 錯誤:pathspect 'commit' 與 git 已知的任何文件都不匹配。

I have been told that this is happening because the arguments are in the wrong order.有人告訴我,這是因爲參數順序錯誤。

The thing I noticed is that when I use git add .我注意到的是,當我使用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.我將不勝感激有關如何糾正此問題的任何建議。


還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.