Hi Matt,

Anything is possible :)

If I get this straight, you want new customer-development to take place in 
repo B.

And then later on, get that development back into the big A?

And then be able to continue developing in repo B?

Cherry-pick or patches certainly sound like a straightforward way to handle 
this..

It could also be a job for the git subtree command, which was briefly 
mentioned in another thread here 
recently: https://github.com/apenwarr/git-subtree/blob/master/git-subtree.txt

I haven't used subtree myself, but I imagine you could structure it like 
this:

Repo A (10 years of history)
\- subfolder1
\- subfolder2

Repo A` (export of repo A, little history)
\- subfolder1
\- subfolder2

Now, start doing the customer's development in a new empty repository X:

Repo X
\- customer-stuff

Now, use git submodule to import Repo X into both A and A`:

Repo A (10 years of history)
\- subfolder1
\- subfolder2
\- customer-stuff

Repo A` (export of repo A, little history)
\- subfolder1
\- subfolder2
\- customer-stuff

Now, using git subtree, it should be possible to update Repo X with changes 
you do inside A or A` customer-stuff, and then sync it back to the other 
repo, in either direction.

Note that the above is just a product of my imagination, I haven't tried it 
myself. If you are not very comfortable with Git in general and don't have 
time digging into how subtree works, you should probably just stick to 
using patches.


On Thursday, May 24, 2012 5:40:52 PM UTC+2, 7ff wrote:
>
> Hello,
>
> I would appreciate some help or suggetions on this problem:
>
> condensed version:
> -----------------------------
>
> A) a "big" repository with long history and a submodule
> B) a "small" repo made recently from an export of repo A, except some 
> files/folders and including the files from the submodule of A
>
> how can I merge new commits (or cherrypick)?
>
>
> more detailed:
> -----------------------
> repo A is a project with about 10 years of history (partially imported 
> form svn) which I want to keep. This repo includes files for different 
> customers/ applications.
>
> Recently, I agreed to work on this project with a team of one customer in 
> a shared git repository. Obviously, they must not be able to see private 
> files belonging to other customers. And there was no need for them to see 
> my 10ys of history.
> So for a quick start, I just created a new repository with the files to be 
> used. And to make things simpler (maybe more complicated now) I included 
> the files from the submodule.
>
> Now I want to link the two repos so that I can merge new commits between 
> the two repos. 
> (git remote starts with a "no common history" warning ... so maybe some 
> merge -s ours magic should be applied ... ? But the difference in 
> submodules makes me doubt that this will be easy)
>
> To be sure not to import private object into B, merging one way B into A 
> alone would be a helpful start. Ideally, I would to able to merge both ways.
>
> Is this possible at all? Or should I prepare to juggle with patch files?
>
> Thanks,
> Matt
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/Drqh5EwHOboJ.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to