About Github migration

Heiko W.Rupp hrupp at redhat.com
Fri Sep 21 14:44:03 UTC 2012


Hi,

to get some experience I tried how some migration to github might look like.
I did that with my personal GitHb account, so this is not available in 
github/rhq-project (yet)

** First I basically followed the answer to this question on stack overflow
to pull stuff from FH and pushed to GH

http://stackoverflow.com/questions/5181845/git-push-existing-repo-to-a-new-and-different-remote-repo-server

I think for a real migration we would first do a 

git fetch --all
git remote add github <github url>
and then a 
git push --mirror github

This should copy the whole repository inc. all branches and tags.

We may consider pruning old tags and branches here - especially as
the FH repo is not going away.

** Then I went and cloned the repo locally and followed 
http://stackoverflow.com/a/359759/100957

to separate out the modules/plugins directory into its own repo.
Created a new repo on github rhq-plugins and pushed the 
plugins to this new repo

** In the third step I cloned the github rhq repository and
followed the first comment to http://stackoverflow.com/a/955793/100957
to clean out the plugins from above rhq repository and tried to push the result to github.
This whole locally cleaning  "took ages"

The push failed, as the local repo and the remote have diverged.
One can use -f here to forcibly push (which I've done)
Or in an earlier step not push the rhq repo until after the split-off of the plugins.
Or in the main repo just rm -r && git rm on the plugins and have the removal
recorded in the history. This may even be faster than pruning that directory hierarchy out.


Results are now at
https://github.com/pilhuhn/rhq
and
https://github.com/pilhuhn/rhq-plugins

   Heiko

-- 
Reg. Adresse: Red Hat GmbH, Technopark II, Haus C, 
Werner-von-Siemens-Ring 14, D-85630 Grasbrunn
Handelsregister: Amtsgericht München HRB 153243
Geschaeftsführer:  Mark Hegarty, Charlie Peters, Michael Cunningham, Charles Cachera



More information about the rhq-devel mailing list