How to git commit a single file/directory

前端 未结 7 1768
我寻月下人不归
我寻月下人不归 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:23

    Use the -o option.

    git commit -o path/to/myfile -m "the message"
    

    -o, --only commit only specified files

提交回复
热议问题