今天提交文件到github,步骤是:html
在第二步是,出现错误,错误以下:git
D:\tensorflow>git commit -m ' add codes for abc'
error: pathspec 'add' did not match any file(s) known to git.
error: pathspec 'codes' did not match any file(s) known to git.
error: pathspec 'for' did not match any file(s) known to git.
error: pathspec 'abc'' did not match any file(s) known to git.github
语法上没有问题,老是提交不了,最后发现,在Linux系统中,commit信息使用单引号''包括,我使用的windows系统,信息应该是双引号""包括,即第二步命令正确格式是git commit -m "add condes for abc"
windows
在分析上面问题的时候,发现了几个有用的命令:编辑器
git commit --amendspa
git resetcode
git add
命令的执行,区别于git commit --amend
,该命令更倾向于取消上一次的暂存区提交,git commit --amend
更倾向于修改提交说明