0 votes
1 view
in DevOps and Agile by (30k points)

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?

1 Answer

0 votes
by (51.2k points)

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.

Related questions

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...