报错 pathspec '–m' did not match any file(s) known to git.

Use shell to write git commit -mcommands and report errorspathspec '–m' did not match any file(s) known to git.

The script is as follows

cd /Users/Mark.W/Documents/AboutMyself/ 
git add .
git commit -m "add_upload_picture"
git push origin master

But running it from the command line has no problem.

In the end, it was found that there is no need to add the shell script “”, just remove the quotation marks. Still not familiar with shell programming.

The modified shell is:

cd /Users/Mark.W/Documents/AboutMyself/ 
git add .
git commit -m add_upload_picture
git push origin master

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325672321&siteId=291194637