git: how to revert file which is in .gitignore [fatal: empty commit set passed]

前端 未结 1 1892
长发绾君心
长发绾君心 2021-01-21 11:29

My .gitignore file has the following line

vendor/

I have modified a file inside the vendor folder. Now when I do update my bundles by performi

相关标签:
1条回答
  • 2021-01-21 11:57

    You can do either:

    1. Revert the file you changed to its initial state:

      git checkout path/to/file
      
    2. Remove the vendor/ directory and run bin/vendors install again. That way you are sure everything is new.

    A rule of thumb of thumb is that should NEVER modify files in the vendor/ directory.

    Hope that helps!

    0 讨论(0)
提交回复
热议问题