Difference between revisions of "Subversion to Git Conversion: Notes on the Details"
From GlueXWiki
(Created page with "The last revision in the Subversion repository before conversion: Rev 19042 2015-07-15 17:35:06 <ol> <li>Delete the practice repositories on GitHub.</li> <li>Create a blan...") |
|||
Line 1: | Line 1: | ||
+ | ==Subversion State at Conversion== | ||
+ | |||
The last revision in the Subversion repository before conversion: Rev 19042 2015-07-15 17:35:06 | The last revision in the Subversion repository before conversion: Rev 19042 2015-07-15 17:35:06 | ||
+ | ==The Procedure== | ||
<ol> | <ol> | ||
Line 12: | Line 15: | ||
<li>Add repositories to the list of those owned by the gluex team on GitHub.</li> | <li>Add repositories to the list of those owned by the gluex team on GitHub.</li> | ||
</ol> | </ol> | ||
− | The sim-recon conversion with svn2git took about 8 hours. | + | 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: | ||
+ | |||
+ | <code>cd /path/to/conversion<br/> | ||
+ | svn2git https://halldsvn.jlab.org/repos --no-minimize-url -v --trunk trunk/sim-recon --branches branches --tags tags</code> | ||
+ | |||
+ | To prepare local repository for import to GitHub: | ||
+ | |||
+ | <code>cd /path/to/clone<br/> | ||
+ | git clone --bare file:///path/to/conversion</code> | ||
+ | |||
+ | To do the import, from the local host: | ||
+ | |||
+ | <code>cd /path/to/clone/conversion.git | ||
+ | git push --mirror https://github.com/jeffersonlab/sim-recon.git</code> |
Revision as of 11:36, 20 July 2015
Subversion State at Conversion
The last revision in the Subversion repository before conversion: Rev 19042 2015-07-15 17:35:06
The Procedure
- Delete the practice repositories on GitHub.
- Create a blank repository to receive the converted repository on GitHub.
- Make a copy of the complete Subversion repository on the local disk with rsync.
- Use svn2git to do the conversion using the local-disk-resident version of the Subversion repository.
- In the resulting git repository, delete branches and tags not related to the package, as well as all "@revision" branches and tags.
- Clone a bare copy of the repository (--bare option).
- Push the bare copy to the GitHub repository with the --mirror option.
- 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