[Insight-developers] How do I: rebase ITK from a github repo to itk.org master?

Brad King brad.king at kitware.com
Mon Jun 27 11:30:06 EDT 2011


On 06/27/2011 10:53 AM, Williams, Norman K wrote:
> This is kinda blowing my mind.
> 
> We (at Iowa) have been doing the new FEM framework here:
> 
> https://github.com/vmagnotta/ITKFEM-Modular/tree/FEM_PHASE_7_INTEGRATION
> 
> 
> and it's time to rebase our work onto the ITK master repo.  So I want to
> take that branch and rebase it onto the ITK master.
> 
> What does this entail?

It looks like Hans has rebased that branch a few times already.

In a repository cloned from itk.org/ITK.git, fetch and checkout:

  git fetch https://github.com/vmagnotta/ITKFEM-Modular.git FEM_PHASE_7_INTEGRATION
  git checkout -b FEM_PHASE_7_INTEGRATION FETCH_HEAD

If you already have the branch in a repository cloned from itk.org
then you can skip that step.  Then:

  git fetch origin
  git rebase origin/master

You will get some conflicts in itk-module.cmake files.  Resolve them
by taking the master side and adding the extra dependencies that the
branch needs.  The final commit after rebasing should have changes
like those shown below in these files.

-Brad


diff --git a/Modules/Core/SpatialObjects/itk-module.cmake b/Modules/Core/SpatialObjects/itk-module.cmake
index 01a8584..6014852 100644
--- a/Modules/Core/SpatialObjects/itk-module.cmake
+++ b/Modules/Core/SpatialObjects/itk-module.cmake
@@ -10,6 +10,7 @@ itk_module(ITK-SpatialObjects
     ITK-ImageFunction
     ITK-Mesh
     ITK-IO-Base
+    ITK-MetaIO
   TEST_DEPENDS
     ITK-TestKernel
   DESCRIPTION
diff --git a/Modules/Numerics/FEM/itk-module.cmake b/Modules/Numerics/FEM/itk-module.cmake
index a6062f4..ed1bd2c 100644
--- a/Modules/Numerics/FEM/itk-module.cmake
+++ b/Modules/Numerics/FEM/itk-module.cmake
@@ -2,6 +2,8 @@ itk_module(ITK-FEM
   DEPENDS
     ITK-ImageFunction
     ITK-RegistrationCommon
+    ITK-SpatialObjects
   TEST_DEPENDS
     ITK-TestKernel
+    ITK-IO-SpatialObjects
 )
diff --git a/Modules/Registration/FEM/itk-module.cmake b/Modules/Registration/FEM/itk-module.cmake
index 5e94257..78c7cb4 100644
--- a/Modules/Registration/FEM/itk-module.cmake
+++ b/Modules/Registration/FEM/itk-module.cmake
@@ -1,6 +1,7 @@
 itk_module(ITK-FEMRegistration
   DEPENDS
     ITK-FEM
+    ITK-SpatialObjects
     ITK-ImageStatistics
     ITK-PDEDeformableRegistration
     ITK-ImageFeature


More information about the Insight-developers mailing list