Git: Ignore files for public repository, but not for private

后端 未结 8 1072
心在旅途
心在旅途 2020-12-01 07:54

I\'m deploying a Rails app on Heroku (for now) via git, and would also like to have a public version for people to look at. Some files are sensitive and should only be commi

8条回答
  •  半阙折子戏
    2020-12-01 08:01

    One way to do this would be to put your private file(s) in a submodule, and refer to that module from your public repo. (Alternately, you could put your public files in a submodule, and refer to that repo from your private repo.)

提交回复
热议问题