Dario Dario - 1 year ago 206
Git Question

Why am I getting "Commit failed with error: pathspec ... did not match any file(s)"?

I am having some issues with Git.

I have a repository where I can commit any file to without problem. However, there is a single file 'Funder.php' which, when I try committing, tells me there is an error as:

Commit failed with error:
pathspec 'application/libraries/Funder.php' did not match any file(s) known to git.

I am quite new to this, so was wondering if anybody could please help?

Answer Source

This is the error you get when you attempt to run

git commit <file>

but <file> hasn't been staged yet; in other words, Git hasn't been told about it, yet. This is most likely what's happening here. Run

git add application/libraries/Funder.php

then try to commit.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download