conf t

インフラエンジニアのメモ

windowsのgit for windowsでコミットする際のエラー

windowsのgit for windowsでコミットする際のエラー。

以下を参考に試していました。
Windowsにgitをインストールしてgithubにpushするまで | karakaram-blog

しかし、コメント付きでコミットしようとしたら、怒られました。

C:\Users\testuser\test>git commit -m 'comment'
error: pathspec 'commit'' did not match any file(s) known to git.

以下のようにダブルクオーテーションでコメントし直したら、成功しました。

C:\Users\testuser\test>git commit -m "commit"
[master (root-commit) 214ace5] first commit
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 README

参考: Gitを触ってみるよ その1「Gitのイメージと初めてのコミット」 - Stellaqua - TOMの技術日記