About Github migration

John Sanda jsanda at redhat.com
Wed Oct 17 20:46:20 UTC 2012


I took a look at https://github.com/pilhuhn/rhq/tree/master/modules/ and see that the plugins are still there. Will the plugins subdirectory get purged since you split them out into a separate repo? If I push a branch to the rhq-plugins repo, will there be any issues since the source trees will be different? In other words, if I push a branch that exists in the fedora hosted repo over to the rhq-plugins repo, will that wind up pulling in parts of the source tree outside of the plugins directory?

On Oct 17, 2012, at 4:18 PM, "Heiko W.Rupp" <hrupp at redhat.com> wrote:

> Hi, 
> 
> as a followup I have 
> Am 21.09.2012 um 16:44 schrieb Heiko W.Rupp:
> 
>> 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.
> 
> This seems to copy all tags, but not all branches.
> 
> One can probably just loop over all branches like e.g. 
> 
> $ git checkout -t -b rhq-on-as7 origin/rhq-on-as7
> $ git push github rhq-on-as7:rhq-on-as7
> 
> One has to be careful here, as
>  a) the correct branch needs to be taken 
> and
>  b) the name on the remote should be just rhq-on-as7 and not origin/rhq-on-as7
> 
> Something like
> 
> BRANCHES=`git branch -r | grep -v "upstream/" | sed -e 's/^ *origin\///'`
> for B in $BRANCHES 
> do
>  echo $B
>  git checkout -b origin/$B
>  git push upstream $B:$B
> done
> 
> There may be a better way, than individually pushing them 
> 
>  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
> 
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/rhq-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/rhq-devel/attachments/20121017/972ca129/attachment.html>


More information about the rhq-devel mailing list