[英]Migrate a unhosted SVN Repo to GIT
I have a SVN repository (1.6GB in size) which has just been provided to me by my client. 我有一个SVN存储库(大小为1.6GB),是我的客户刚刚提供给我的。 The repository is not hosted and has been provided to me in a ZIP file format. 该存储库未托管,并以ZIP文件格式提供给我。 How can I convert this to a GIT-BitBucket repo ? 如何将其转换为GIT-BitBucket存储库?
All the answers I have found for migrating SVN to GIT needs the SVN repository to be hosted somewhere and then using svn git perform the migration, but this is just a zip file I have. 我找到的所有将SVN迁移到GIT的答案都需要将SVN存储库托管在某个地方,然后使用svn git进行迁移,但这只是我的一个zip文件。 I also want to maintain the history of commits and branches if possible. 如果可能,我还想保留提交和分支的历史记录。
What would be the best way to do this ? 最好的方法是什么?
You can host the svn on your own computer and then do the conversion instructions normally. 您可以将svn托管在自己的计算机上,然后正常执行转换说明。 The url for the server would then start with file://
instead of normal http://
or any similliar protocol 然后,服务器的url将以file://
开头,而不是普通的http://
或任何类似协议
In a comment, you said that you have the repository itself, with the "trunk, branches, tags" folder. 在评论中,您说您拥有存储库本身,并带有“ trunk,branches,tags”文件夹。 That is a checkout of the repository, not the actual repository. 那是对存储库的签出,而不是实际的存储库。 The root directory of a repository looks more like this: 存储库的根目录看起来像这样:
drwxrwsr-x 2 svn svn 4096 Sep 29 2005 conf/
drwxrwsr-x 2 svn svn 4096 Sep 29 2005 dav/
drwxrwsr-x 6 svn svn 4096 Jun 23 02:31 db/
drwxr-xr-x 2 svn svn 4096 Jun 23 07:09 hooks/
drwxrwsr-x 2 svn svn 4096 Sep 29 2005 locks/
drwxr-sr-x 7 svn svn 4096 Feb 7 2008 tags/
-r--r--r-- 1 svn svn 379 Sep 29 2005 README.txt
-r--r--r-- 1 svn svn 2 Sep 29 2005 format
And the README.txt says something like this: README.txt表示如下:
This is a Subversion repository; use the 'svnadmin' tool to examine
it. Do not add, delete, or modify files here unless you know how
to avoid corrupting the repository.
If the directory "db" contains a Berkeley DB environment,
you may need to tweak the values in "db/DB_CONFIG" to match the
requirements of your site.
Visit http://subversion.tigris.org/ for more information.
If you don't have that, then you don't have the repository. 如果没有,则没有存储库。
(If it matters, the above is from a Subversion 1.8 repo, format 3.) (如果重要,上面的内容来自Subversion 1.8存储库,格式3。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.