Project

General

Profile

Notes on moving from CVS to Redmine GIT

We have PPFX code allocated at Fermilab CVS area. An empty GIT repository was created by Lynn Garren to host PPFX. Then, we had to convert from CVS to GIT and keep the complete history. The next steps were followed:

  • Import the code from cvs (including commit history) to a local git repository (called "local rep" in this doc):
        git cvsimport -v -d :pserver:anonymous@cdcvs.fnal.gov/cvs/projects/numi-beam-sim ppfx
    

    remote: ssh:///cvs/projects/ppfx
  • Check if the Redline GIT repository ((called "remote rep" in this doc)) is bare. I run the next command in the Redline Repository.
    git rev-parse --is-bare-repository 
    

    the output was "true".
  • In the local rep, I added the remote rep:
       git remote add orig2 ssh://p-ppfx@cdcvs.fnal.gov/cvs/projects/ppfx
    

    where orig2 is a name for the remote rep.
  • I ran in batch the following lines to track the branches:
    for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do
        git branch --track ${branch#remotes/orig2/} $branch
    done
    
  • And finally, I pushed all commits and tag to the remote rep:
    git push orig2 --all    
    git push orig2 --tags