1. 問題--使用git將代碼提交到碼雲,使用到以下命令時:
git commit -m 'init project'
# 報錯 error: pathspec 'project'' did not match any file(s) known to git.
2. 解決方法:將單引號換成雙引號就行了
git commit -m "init project"
3.備注:
在Linux系統中,commit信息使用單引號包括,windows系統,commit信息使用雙引號。
所以在git bash中git commit -m '提交說明' 這樣是可以的,但是在win命令行中就要使用雙引號。