How to stop tracking a file without removing it from repo

后端 未结 4 1140
醉话见心
醉话见心 2021-01-30 11:11

I have a config file which I want to keep on the remote repository, but I don\'t want to track its changes on my computer. Adding it to .gitignore doesn\'t do the trick.

<
4条回答
  •  孤街浪徒
    2021-01-30 11:26

    If you want to temporarily stop tracking a file, you can still use

    git update-index --assume-unchanged 
    // track changes again :
    git update-index --no-assume-unchanged 
    

提交回复
热议问题