search

Home  >  Q&A  >  body text

How to solve the problem that gitignore cannot ignore files?

The line home/ was added to the .gitignore file, but git status still shows that there is a home/xxx file. Can't it be ignored? What is the reason? How to solve it?

高洛峰高洛峰2767 days ago563

reply all(3)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-02 09:32:01

    It is recommended to check whether the .gitignore file and home are in the same folder? If not, it is recommended to put them together and try again.

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-02 09:32:01

    .gitignore edited after a commit?

    I have encountered this before, that is, after home is submitted, editing .gitignore does not work.

    reply
    0
  • 怪我咯

    怪我咯2017-05-02 09:32:01

    Just clear the cache, git rm -r --cache folder/

    reply
    0
  • Cancelreply