How to git commit a single file/directory

前端 未结 7 1779
我寻月下人不归
我寻月下人不归 2020-12-04 06:58

Tried the following command:

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

Receive an error in git version 1.5.2.1:

error:         


        
7条回答
  •  爱一瞬间的悲伤
    2020-12-04 07:21

    Your arguments are in the wrong order. Try git commit -m 'my notes' path/to/my/file.ext, or if you want to be more explicit, git commit -m 'my notes' -- path/to/my/file.ext.

    Incidentally, git v1.5.2.1 is 4.5 years old. You may want to update to a newer version (1.7.8.3 is the current release).

提交回复
热议问题