Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 git 源代码存储库中有一个特定文件,其中包含生产设置/密码。我想限制这个文件,以便只有生产团队的成员才能看到它。但是,我想控制它的变化。
我想过在 git 中使用一个子模块,然后限制对新存储库的访问。但是,git 似乎需要子模块的整个子目录,而我只想添加一个特定的文件。作为开发工具工作方式的副作用,我无法为配置文件创建子目录。
谁能给我一些指导,看看是否有办法为这些文件创建几乎与另一个存储库的合并点?
唯一的方法似乎是编写 git 挂钩来加密您想要保密的部分。否则 git 在 repo 级别处理文件,而不是作为单个实体。