1. 程式人生 > >git commit 遇到error: pathspec

git commit 遇到error: pathspec

 吐槽一下,作為剛剛學著使用git的菜鳥,遇到的第一個問題。
 問題描述:是在git clone 一個repository後,新增了兩個檔案,但是在git commit時提示error: pathspec 'add README.txt.........' did not match any file(s) known to git.
 後仔細檢視命令時發現我在git commit時少加了 -m 引數造成的。
 錯誤時命令是:git commit 'add README.txt.....'
 應是:git commit -m 'add README.txt......'