相关疑难解决方法(0)

如何git提交单个文件/目录

尝试以下命令:

git commit path/to/my/file.ext -m 'my notes'
Run Code Online (Sandbox Code Playgroud)

在git版本1.5.2.1中收到错误:

error: pathspec '-m' did not match any file(s) known to git.
error: pathspec 'MY MESSAGE' did not match any file(s) known to git.
Run Code Online (Sandbox Code Playgroud)

单个文件或目录提交的语法是否不正确?

答: 参数有望在这一顺序...

git commit -m 'my notes' path/to/my/file.ext

更新:它不再严格:)

git commit

207
推荐指数
6
解决办法
28万
查看次数

标签 统计

commit ×1

git ×1