Git: how to undo a file that is in .gitignore [fatal: empty commit set accepted]

My .gitignore file has the following line

vendor/

I changed the file inside the provider folder. Now when I update my packages by doing -

bin/vendors install
  • I see the following message

"Package Name" has local modifications. Copy or return / click them before running this command again.

I understand that I should not change anything in the bundles and am trying to fix this error.

When I try to return the file by running the command:

git revert <path>/<filename>.twig

I get this error message

fatal: passed an empty set of commits

git rm doesn't work either.

How can I install my package?

+2
source share
1 answer

You can do either:

  • :

    git checkout path/to/file
    
  • vendor/ bin/vendors install . , , .

: vendor/.

, !

+3

Source: https://habr.com/ru/post/1548302/


All Articles