[Insight-developers] Plan to host the SimpleITK git repo here at Kitware

Brad King brad.king at kitware.com
Mon Jun 6 18:04:16 EDT 2011


On 06/06/2011 04:53 PM, Bradley Lowekamp wrote:
> How do I copy a topic from the old repo to the new given that
> they have no common history?

Two approaches come to mind:

(1) git format-patch & git am

 $ cd old
 old$ git checkout mytopic
 old$ git format-patch -M origin/master.. -o ../patches
 old$ cd ../new
 new$ git checkout -b mytopic
 new$ git am ../patches/*

(2) git rebase --onto

 $ cd old
 old$ git remote add new git://itk.org/SimpleITK.git
 old$ git fetch new
 old$ git rebase --onto new/master origin/master mytopic
 old$ cd ../new
 new$ git fetch ../old mytopic
 new$ git checkout -b mytopic FETCH_HEAD

-Brad K


More information about the Insight-developers mailing list