简体   繁体   English

使用git-flow与每个项目/应用程序的多个git存储库?

[英]using git-flow with multiple git repositories per project/app?

At my current place of work we are using git-flow, we use the standard buckets (develop in develop, release in master, feature this, feature that, etc). 在我目前的工作地点,我们正在使用git-flow,我们使用标准存储桶(在开发中开发,在master中发布,具有此功能,功能等)。

We are using a large number of git repositories (per project) where often I have to start a 'feature' in more than one git. 我们正在使用大量的git存储库(每个项目),我经常需要在多个git中启动一个“功能”。 Typically around three git repos. 通常是三个git回购。

myApp
    git: bitofcode1
    git: scripts
    git: library

I try to use the same feature name 'feature-change-whatever' across all the three git repos but it feels to me that the git-flow model is not appropriate for dealing with new features in a project spread across multiple repos. 我尝试在所有三个git repos中使用相同的功能名称'feature-change-whatever',但我觉得git-flow模型不适合处理跨多个repos的项目中的新功能。

myApp
    git: bitofcode1 (feature-change-whatever)
    git: scripts  (feature-change-whatever)
    git: library  (feature-change-whatever)

My thoughts are that in order to use git-flow with 'myapp' I would be better merging my 3 different git repositories into a single larger one. 我的想法是,为了将git-flow与'myapp'一起使用,我最好将我的3个不同的git存储库合并为一个更大的存储库。 Are there any other ways of addressing this while using git-flow ? 在使用git-flow时还有其他方法可以解决这个问题吗?

gitslave : Coordinated multi-repository super-projects for Git gitslave :Git协调的多存储库超级项目

gitslave creates a group of related repositories—a superproject repository and a number of slave repositories—all of which are concurrently developed on and on which all git operations should normally operate; gitslave创建了一组相关的存储库 - 一个超级项目存储库和一些从属存储库 - 所有这些存储库都是在所有git操作正常运行的基础上同时开发的。 so when you branch, each repository in the project is branched in turn. 因此,当您分支时,项目中的每个存储库依次分支。 Similarly when you commit, push, pull, merge, tag, checkout, status, log, etc; 同样,当你提交,推,拉,合并,标记,结账,状态,日志等; each git command will run on the superproject and all slave repositories in turn. 每个git命令将依次在超级项目和所有从属存储库上运行。

This way you can (as stated) create feature branches across multiple repositories in a "single larger" repo. 通过这种方式,您可以(如上所述)在“单个更大”的仓库中跨多个存储库创建功能分支。 See the gitslave basic tutorial . 请参阅gitslave基础教程

Unfortunately the most recent version at the time of writing gitslave (2.0.2) is outdated with respect to some changes in plain git 's output. 不幸的是,编写gitslave(2.0.2)时的最新版本对于普通git输出的一些变化已经过时了。

Edit: forked gitslave and applied some basic patches to get it working again. 编辑: 分叉gitslave并应用一些基本补丁以使其再次工作。 Check it out! 看看这个!

With brew on Mac OS X you can now: 使用Mac OS X上的brew ,您现在可以:

brew tap joelpurra/joelpurra
brew install --devel joelpurra/joelpurra/gitslave

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM