Git忽略每个分支或远程存储库的文件 [英] Git ignore files per branch or remote repository
问题描述
已使用
Git,Github.com
问题
我有一个包含文件的项目:A,B,C,D,E。
- on:A,C,D(不想将B,E暴露给他们)
- 当第二组工作时:B,D,E(不想公开A,C给他们)
- 我想工作:A,B,C,D,E
然后,我将Team 1的工作,并将A,C,D与我的工作合并,然后将Team 2工作并将B,D,E与我的工作合并。
如果需要,我可以为每个团队创建一个回购。
不工作
文章,并尝试他们提供的一切。
- 子模块不适合我 - 文件位于不同的位置,我需要忽略不同的文件束对于每个开发人员团队
- 每个分支的Excludes文件不起作用
- .gitignore将在我拉动时删除这些2-3个文件
我不想相信没有简单而优雅的解决方案,只是忽略每个推送或分支或远程回购或其他某些文件...
添加
- 我不能将一个项目分成几个项目
解决方案我会创建三个项目:
$ b $ ul
- D(常见,对所有人都可见)
- A和C(对您和团队1可见),对D的依赖B $和
(对你和团队2可见),依赖D
如果我想设计更好的访问控制, A来自D的C或B。
我不认为我会尝试使用忽略文件进行访问控制。
Used
Git, Github.com
Problem
I have a project with files: A, B, C, D, E.
- I would like Team 1 work on: A, C, D (do not want to expose B, E to them)
- While Team 2 work on: B, D, E (do not want to expose A, C to them)
- And I would like to work on: A, B, C, D, E
Then I pull Team 1 work and get A, C, D merged with my work and then pull Team 2 work and get B, D, E merged with my work.
I can create a repo per team if needed.
Not working
I have read all articles and tried everything they provided.
- Submodules not working for me - files are in different locations and I will need to ignore different bunch of files for each developer team
- Excludesfile per branch just doesn't work
- .gitignore will delete those 2-3 files when I pull
I do not want to believe there is no easy and elegant solution just to ignore some files per push or branch or remote repo or something else...
Additions
- I cannot separate one project into several projects
I would create three projects:
- D (common, visible to all)
- A and C (visible to you and Team 1), dependency on D
- B and E (visible to you and Team 2), dependency on D
I would further split projects if I envisage ever wanting finer access control that separates A from C or B from D.
I don't think I would try to use ignore files for access control.
这篇关于Git忽略每个分支或远程存储库的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!