[petsc-dev] how do people manage projects that require two or more PETSc branches

Barry Smith bsmith at petsc.dev
Sat Apr 17 17:24:49 CDT 2021


   Say I have a project (a code whose source is not in the PETSc repository) that requires code from two PETSc branches (that may or may not yet be MR) but I do not want to make a single PETSc branch (since it would be incoherent). I may possibly be needing to add code to both of the PETSc branches as I develop the project. I also need to do development sometimes on different machines.

   I can do 

      git checkout branch1
      git checkout -b combinedbranch
      git merge branch2 
      configure
      make
      use for a while

but now I need to fix or add something to branch1 (which, of course, will be an iterative process as I write the code and fix it) and then add something in branch2. 

Doing the above procedure over and over again is tedious and prone to produce errors, editing in the wrong branch etc.

Does anyone have advice on good work flows for this situation?

Barry



More information about the petsc-dev mailing list