Git ignore deleted files

后端 未结 4 1627
灰色年华
灰色年华 2020-12-28 07:57

I have a website project that has more than 50,000 unimportant files (to development) in some directories.

/website.com/files/1.txt
/website.com/files/2.txt
         


        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-28 08:36

    Creating a sub-repo is one solution, but you should make that sub-repo a submodule.

    That way:

    • you keep a link between your normal content and that 'files' content
    • if the 'files' content evolves one day, you can register its evolution in the main repo
    • you can checkout your main repo without " git submodule update " (that is without filling the 'files' content
    • on deployment, a git submodule update after the git submodule init will be enough to get back the right version of the 'files' content.

提交回复
热议问题