LoginSignup
9
7

More than 3 years have passed since last update.

Gitでのcommitエラーメモ

Last updated at Posted at 2019-06-24

Gitでcommitエラーに遭遇

WindowsでGitを用いてコミットしようとした際にエラーに遭遇。

実行文

>git commit -m 'first commit'

エラー文

error: pathspec 'commit'' did not match any file(s) known to git

add時に存在したファイルが、commit時に無くなっていたときに出るエラー

環境

  • Windows10
  • Git for Windows

>git version git version 2.19.1.windows.1

解決方法

Gitでは、commitメッセージはシングルクオーテーションではなくダブルクオーテーションを用いて書く。

x >git commit -m 'first commit'
o >git commit -m "first commit"

9
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
7