From: <dag@cray•com>
To: Hilco Wijbenga <hilco.wijbenga@gmail•com>
Cc: Git Users <git@vger•kernel.org>
Subject: Re: organizing multiple repositories with dependencies
Date: Tue, 24 Apr 2012 18:33:08 -0500 [thread overview]
Message-ID: <nngd36w1z9n.fsf@transit.us.cray.com> (raw)
In-Reply-To: <CAE1pOi2KgeLPg7UVRP7dbqLFJErsKUx22Mi5aSkphy7KMJhoUQ@mail.gmail.com> (Hilco Wijbenga's message of "Tue, 24 Apr 2012 11:54:08 -0700")
Hilco Wijbenga <hilco.wijbenga@gmail•com> writes:
>>> I'm assuming that if you have subproject S in umbrella project U and a
>>> branch "topic" in U then that same branch should exist in S.
>>
>> No, I think that is actually very rare. If topic branches really should
>> be mirrored then U and S should be one repository. They are too closely
>> coupled to be separated. But see the but about git-subtree and topic
>> branches below.
>
> Too closely coupled? I do not think breaking up a project into a set
> of libraries makes everything tightly coupled. I would argue the
> opposite. :-) Anyway, you answer my concern below.
If you need the same topic branch for each component they would indeed
seem to be very tightly coupled, even if the code is "physically"
separated. I can't think of a situation where I would need to implement
the same or similar features in multiple components where those
components are not tightly coupled in some way.
> What would happen if you had a bunch of commits in the umbrella
> project and then did a push? Would that error out? Are there
> protections in place to prevent developers from making silly mistakes
> like that?
It would push to the remote/origin of the umbrella project, maintaining
the same "whole project" history. It's an explicit operation to split
the commits on any subproject out and push them to the subproject's
origin.
So let's say you want to branch each subproject for release. You could
do something like this (off the top of my head so don't copy/paste
verbatim):
branch U release_X # Create the branch in the umbrella project
work, work, work
git subtree split S1 S1_release_X # Split commits to S1 made on
# release_X branch
git subtree split S2 S2_release_X
git subtree split S3 S3_release_X
git checkout S1_release_X # Send commits to S1 to origin,
git push origin_S1 release_X # creating branch release_X
git checkout S2_release_X
git push origin_S2 release_X
git checkout S3_release_X
git push origin_S3 release_X
It's the split/checkout/push sequence that I'd like to optimize and make
simpler.
-Dave
next prev parent reply other threads:[~2012-04-24 23:33 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-16 9:27 organizing multiple repositories with dependencies Namit Bhalla
2012-04-16 14:30 ` Jakub Narebski
2012-04-16 20:08 ` dag
2012-04-17 17:29 ` Hilco Wijbenga
2012-04-17 17:51 ` dag
2012-04-17 18:37 ` Seth Robertson
2012-04-17 19:55 ` Hilco Wijbenga
2012-04-17 20:51 ` dag
2012-04-17 21:43 ` Hilco Wijbenga
2012-04-17 22:25 ` PJ Weisberg
2012-04-17 22:49 ` Hilco Wijbenga
2012-04-18 10:15 ` Namit Bhalla
2012-04-18 12:09 ` Jens Lehmann
2012-04-24 17:17 ` dag
2012-04-24 18:54 ` Hilco Wijbenga
2012-04-24 21:09 ` PJ Weisberg
2012-04-24 22:04 ` Hilco Wijbenga
2012-04-24 23:33 ` dag [this message]
2012-04-30 19:25 ` Phil Hord
2012-04-30 19:43 ` dag
2012-04-18 12:19 ` Jens Lehmann
2012-04-24 17:22 ` dag
2012-04-24 17:59 ` Seth Robertson
2012-04-24 20:26 ` Jens Lehmann
2012-04-24 20:52 ` Seth Robertson
2012-04-24 23:21 ` dag
2012-04-28 17:31 ` username localhost
2012-04-24 23:25 ` dag
2012-04-25 12:48 ` Seth Robertson
2012-04-27 14:23 ` dag
2012-04-24 19:48 ` Eugene Sajine
2012-04-24 22:11 ` Hilco Wijbenga
2012-04-24 23:38 ` dag
2012-04-24 23:36 ` dag
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=nngd36w1z9n.fsf@transit.us.cray.com \
--to=dag@cray$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=hilco.wijbenga@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox