Cmder: git commit error: pathspec 'commit' did not match any file(s) known to git

Created on 27 Feb 2019  路  6Comments  路  Source: cmderdev/cmder

Possible dupe of #847 ?
Thanks for cmder, I've been trying it for about a week and I came across an issue while committing.

git add . works, then
git commit -m 'header works'
returns this:
git commit error: pathspec 'header' did not match any file(s) known to git
git commit error: pathspec 'works' did not match any file(s) known to git

if I then try
git push origin header
returns
already up-to-date
which is not true :sob:

with git bash the commit goes through without issues and so does the push attempt.
Is there any fix for this?

thanks very much guys!

Most helpful comment

Single quotes cannot be used in cmd.exe sessions.

All 6 comments

Single quotes cannot be used in cmd.exe sessions.

Single quotes cannot be used in cmd.exe sessions.

@daxgames
Thanks.
So what can I use when committing? Double quotes? Brackets and single quotes? No quotes?

git commit -m "Double quotes"

Thanks pal, very useful!

Me aparece el mismo error, ya prob茅 comillas simples y dobles y nada,

$ git commit -m index.html "mensaje" error: pathspec 'mensaje' did not match any file(s) known to git

Try git add index.html && git commit -m "mensaje"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

isnullxbh picture isnullxbh  路  3Comments

giuliannosbrugnera picture giuliannosbrugnera  路  3Comments

Joe1992w picture Joe1992w  路  3Comments

spooky picture spooky  路  3Comments

luisrudge picture luisrudge  路  3Comments