ksaitoの日記

日々試したことの覚え書き

git commitできない

移転しました。

自動的にリダイレクトします。

なぜだか、2つ以上のファイルをコミットしようとすると下記のようなエラーが出ます...

$ git commit           
fatal: ambiguous argument 'Makefile README.md': unknown revision or path not in the working tree.     
Use '--' to separate paths from revisions, like this:                                                 
'git <command> [<revision>...] -- [<file>...]'  
$

下記のように1ファイル毎、コミットするとエラーは出ないのですが、ファイル数が多いとつらい...

$ git commit Makefile -m "test"
[test 072a6d3] test
 1 file changed, 1 insertion(+)
$ git commit --amend -m "test"
[test ecee83b] test
 Date: Tue Feb 20 22:41:38 2018 +0900
 2 files changed, 2 insertions(+)
$

なんでだろう?