如何git康尼t a...
Notifications
Clear all

如何git康尼t a single file/directory

RSS

(@anamika)
Noble Member
Joined: 2 years ago
Posts: 1381
15/05/2021 10:41 am

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: pathspec '-m' did not match any file(s) known to git.

error: pathspec 'MY MESSAGE' did not match any file(s) known to git.

Is that incorrect syntax for singe file or directory commits?


Quote
(@abhijith)
Noble Member
Joined: 2 years ago
Posts: 1350
15/05/2021 10:41 am

For this the correct syntax would be:

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

Then you can git commit a single file directory.


ReplyQuote
Share:
Baidu