3

I have a repo on Github that was imported from Google Code (actually, someone else imported it and I forked it). The original project has been dormant on Google Code since 2011. The code is mostly in a single file in the root directory. My fork has the Google Code history. We've made additions to the code.

A third person has also imported the original source to Github, and made changes. Someone forked that and added some more.

(There are other similar Google Code->Github clones, so it might be useful to do something similar with some of those too.)

I would like to somehow unify these, I'd like:

  • to merge the other repo's changes into mine, and
  • to keep the history of their commits.

Ideally, I'd also like:

  • somehow link each repo, perhaps so their network graph's are linked (on Github), and
  • allow future PRs to be made easily between forks.

So:

  1. What's the best way to do this?
  2. Is the second part even possible?
  3. If not, what's the best way around it?
Hugo
  • 27,885
  • 8
  • 82
  • 98

1 Answers1

1

Regarding the mercurial repo, you can start by converting it to Git (fast-export/hg-fast-export.sh).

And regarding the possibility to link two different histories (for two branches of unrelated repo), you can use git grafts (graft point) to make a common history.

See for instance "How to rebase one Git repository onto another one?" (.git/info/grafts + git filter-branch).

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • The Mercurial Google Code repo has already been converted and imported to Git by someone else. That's the basis of my fork. // Thanks, I'll have a go with graft, it sounds like it can do (1). // Any idea of (2) and (3)? – Hugo Feb 28 '14 at 07:54