使用深度Git存储库 - 存储库更改权限以及子存储库和子模块?

时间:2012-05-28 21:33:50

标签: git

我决定在存储库-tree中默认限制可见性范围,以便为优化的东西创建public -folder。现在因为有很多子存储库,我得到一个痛苦的承诺或一些聪明的想法。我不确定最好的方法 - 我考虑过使用find遍历repos然后只是对每个repo执行一致的-dummy提交,例如"default perms lower and polished public things to public dir in the root to get the quality up"但我可能正在重新发明轮子。我不能选择限制子存储库和子模块的数量,因此提交必须从最低的repo开始,然后一点一点地遍历,如果使用find。

如何处理这种深度Git repo-repo -tree更新?

也许是相关的

  
      
  1. Git: how to avoid repetitive committing with sub-sub-sub... Git -repos?

  2.   
  3. Git: a tool to manage and to structure Projects?

  4.   

1 个答案:

答案 0 :(得分:0)

  

使用更好的工具!

避免诸如$ find . -exec git checkout '{}' \;之类的黑客攻击,然后递归/手动修复权限。有一个名为Gitslave的工具可以更轻松地管理扩展的投资组合。有价值的文章here。我还建议你阅读这篇帖子here,再一次是SethRobertson的文章出现 - 非常好的阅读。

你为什么需要Gitslave?

  

假设您在结构中对repo Happy.git进行了更改,例如   "Works.git > Project.git > Pictures.git > Happy.git"。然后有人   试图从你的裸机库中取出Project.git。因为   你是一个混蛋,你只在Happy.git承诺。现在你的   朋友会得到一些令人讨厌的错误。懒惰的git会使用   gitslave - 工具。

$ mkdir t1; cd t1; mkdir t2; cd t2; mkdir t3; git init; echo "t3" >t3; git add .; git commit -m "t3"; cd ..; git init; echo "t2" >t2; git add .; git commit -m "t2"; git init; echo "t1" >t1; git add .; git commit -m "t1"; cd ..; cd t1/t2/t3; echo "only here">only; git add .; git commit -m "only"; cd ../..; git status
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
# t2/
$ Look you need to do repetitive work because you did not use Gitslave!

演练以安装Gitslave

  

不幸的是,Gitslave尚未进入Apt-get下载   here

     

看起来有点像Maven,更多   here。   您可以通过它管理您的项目。首先,指定super -repo   然后你附上奴隶-repos。

$ git clone http://someGitRepoHere.com/xyz.git super
$ cd super; gits prepare
$ gits attach http://someBareRepo.git yourDirHere
     

更多关于153这样的界限   here

当Gitslave进入apt-get等软件包管理软件时,我会继续这个答案,这对人们来说更有用。

相关问题