2

I'm working with a Magento site and anytime I do a git commit * from the application root, the commit fails and prints the following error:

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

There is a media directory in the root of the site and it has been ignored. The global .gitignore file has the following line:

/media

Any ideas how to eliminate this error?

harpun
  • 4,022
  • 1
  • 36
  • 40
Nick
  • 33
  • 1
  • 5

1 Answers1

1

The correct command is

git commit -a

This commits all changes to files that are under source control. From the git help commit user help:

   -a, --all
       Tell the command to automatically stage files that have been modified and deleted, but new files you have not told Git about are not affected.
caveman
  • 1,755
  • 1
  • 14
  • 19