how do I correct the error: pathspec message when committing in git?

It's git commit -m "commit message". You're missing the -m flag.


If you're using Windows you need to use double quotes


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"'

Tags:

Git