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

使用shell写git commit -m命令报错 pathspec '–m' did not match any file(s) known to git.

脚本如下

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

但是在命令行运行没有问题。

最终发现是shell脚本里不用添加“”,去掉引号即可。还是对shell编程不熟悉。

修改后shell为:

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

猜你喜欢

转载自blog.csdn.net/c_j33/article/details/79111754
今日推荐