Why doesn't Git ignore my specified file?

前端 未结 13 1530
野性不改
野性不改 2020-11-28 17:12

I added the following line to .gitignore:

sites/default/settings.php

but when I type git status it shows the file

13条回答
  •  攒了一身酷
    2020-11-28 18:00

    I run into this, it's an old question, but I want that file to be tracked but to not track it on certain working copies, to do that you can run

    git update-index --assume-unchanged sites/default/settings.php
    

提交回复
热议问题