wingologA mostly dorky weblog by Andy Wingo2008-10-14T15:57:04Ztekutihttps://wingolog.org/feed/atomAndy Wingohttps://wingolog.org/merging in unrelated git brancheshttps://wingolog.org/2008/10/14/merging-in-unrelated-git-branches2008-10-14T15:57:04Z2008-10-14T15:57:04Z

Sometimes when you develop code outside the "official" repository for some project, it turns out that after a few months of hacking, your code is actually suitable for inclusion in the mainline.

Typically when this is the case, the code is just imported directly, throwing away the historical records of how that code came to be.

This is a travesty. Not only is the future deprived of the past, you as a hacker do not get sufficient recognition of your efforts. (What good are perfect patches if you do not reap their accolades?)

But suffer not: while Git does not support direct merges between unrelated branches, it can be made to comply. Script here: git-merge-unrelated-branch. (Example commit.)

Be not deprived of your just deserts!