Reputation: 30691
I am trying to commit changes with the command git commit "commit message"
to a local branch, but am getting the following message:
error: pathspec 'commit message' did not match any file(s) known to git.
Upvotes: 31
Views: 28935
Reputation: 21
Very Good point using double quotes on windows. It cost me hours trying to figure out why the single quote didn't work. Thank you! One thing I want to mention here from my own experience is it seems you still have to do 'git commit -a' for some reason to be able later on to push to the remote git repo such as 'git push'. and it's almost no point doing just 'git commit -m "commit message..."' coz you will type it up in a vi editor again anyway when you do 'git commit -a' on windows. I think only on windows you need to do 'git commit -a' instead of just 'git commmit -m "msg"'
Upvotes: 2
Reputation: 258188
It's git commit -m "commit message"
. You're missing the -m
flag.
Upvotes: 57