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.
Whenever I use git commit -m, I receive an error message saying:
git commit error:pathspect 'commit' did not match any file(s) known to 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 . 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.
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".
I would just like to add--
In windows the commit message should be in double quotes (git commit -m "initial commit" instead of git commit -m 'initial commit'), as I spent about an hour, just to figure out that single quote is not working in windows.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With