Merging semi-parallel universes into one coherent repository

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

I created a post on SO about this; pasting it here for convenience:

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
http://stackoverflow.com/questions/25193518/fixing-branches-disconnected-from-master

After "completing" a repository migration, we noticed that all of our
branches are all behind and ahead of master by hundreds to thousands
of commits.

Some context -- originally I used git-svn to migrate the repositories
from SVN to git. Later down the line I used this solution to merge
multiple (7) repositories into one.

However, I also improvised on that solution for the repositories'
branches. The result was disconnected branches -- branches that have
all of the commits and proper change history, but are not actually
associated with master in any way since the commits in the branches
have different SHA's from those in the new, shared master.

Additionally, the original "branching" in the separate repositories
happened at different revisions, for example project X might have
branched for release 1.0 at revision 30 whereas project Y might have
branched fro release 1.0 at revision 42... and all of them have
different times (and perhaps multiple times) where they merged back to
master.

Is there any clean way to fix this link to make it look like all of
these repositories branched together? And to fix the commits so they
actually properly map to commits in master?
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

I am sure there is a better way to word the above... but basically I
have seven used-to-be-separate repositories with the same branches
(say r1.0 as above).  After some magic with filter-branch, they are
all one repository -- all history in-tact.  Additionally, same-named
branches had their histories mashed together.  That's all peachy.

What's *not* peachy is that each of these branches shares commits with
master and doesn't know it.  Thus each branch looks "disconnected"
from master, e.g. there is no pretty branch graph when you look
through the history with "git log --pretty=format:"%h %s" --graph".

Does anybody know of a way to rectify this issue?

Let me know if any clarifications are needed.  Help is much appreciated...

-- Ryan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]