Track local ignored files with Git

前端 未结 2 1610
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-18 13:07

In our repository some files and folders are ignored. Of interest here are:

  1. Build output folders which contain (among others) some configuration files and exte
2条回答
  •  臣服心动
    2020-12-18 13:34

    First, you can add an ignored file to the index and commit it.
    You just need to to git add --force -- /path/to/file.

    Second, you can add the setup files themselves: they contain private data.
    You may consider the template approach, based on a content filter driver which, on checkout, would generate those files (as private non-versioned files) based on:

    • template files (versioned)
    • value files (stored elsewhere, with the right value for each developer's environment)

    smudge

    See for instance "How to keep different content of one file in my local and github repository?"

提交回复
热议问题