Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

git

git-flow

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).

We are using a large number of git repositories (per project) where often I have to start a 'feature' in more than one git. Typically around three git repos.

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.

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. Are there any other ways of addressing this while using git-flow ?

like image 233
azul Avatar asked Nov 02 '22 21:11

azul


1 Answers

gitslave: Coordinated multi-repository super-projects for 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; 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.

This way you can (as stated) create feature branches across multiple repositories in a "single larger" repo. See the gitslave basic tutorial.

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.

Edit: forked gitslave and applied some basic patches to get it working again. Check it out!

With brew on Mac OS X you can now:

brew tap joelpurra/joelpurra
brew install --devel joelpurra/joelpurra/gitslave
like image 168
Joel Purra Avatar answered Nov 15 '22 04:11

Joel Purra