Subversion to Git Conversion: Notes on the Details

From GlueXWiki
Revision as of 11:36, 20 July 2015 by Marki (Talk | contribs)

Jump to: navigation, search

Subversion State at Conversion

The last revision in the Subversion repository before conversion: Rev 19042 2015-07-15 17:35:06

The Procedure

  1. Delete the practice repositories on GitHub.
  2. Create a blank repository to receive the converted repository on GitHub.
  3. Make a copy of the complete Subversion repository on the local disk with rsync.
  4. Use svn2git to do the conversion using the local-disk-resident version of the Subversion repository.
  5. In the resulting git repository, delete branches and tags not related to the package, as well as all "@revision" branches and tags.
  6. Clone a bare copy of the repository (--bare option).
  7. Push the bare copy to the GitHub repository with the --mirror option.
  8. Add repositories to the list of those owned by the gluex team on GitHub.

The sim-recon conversion with svn2git took about 8 hours. Hdds took about 20 hours.

Command Syntax

The magic command to convert from subversion to git:

cd /path/to/conversion
svn2git https://halldsvn.jlab.org/repos --no-minimize-url -v --trunk trunk/sim-recon --branches branches --tags tags

To prepare local repository for import to GitHub:

cd /path/to/clone
git clone --bare file:///path/to/conversion

To do the import, from the local host:

cd /path/to/clone/conversion.git git push --mirror https://github.com/jeffersonlab/sim-recon.git