GIT: How to keep ignored files when switching branches?

后端 未结 3 1353
说谎
说谎 2021-01-02 13:52

I have an App.Local.config file which each developer has their own settings in. I do not want this file checked versioned in the GIT repo as every time it would be overwrit

3条回答
  •  既然无缘
    2021-01-02 14:30

    You should use git rm --cached App.Local.config not only in you working branch but also in the branch you want to switch to, or you will lose your App.Local.config when you switch back to the branch you worked if you only use git rm --cached App.Local.config in that branch.

提交回复
热议问题