当我没有 svn 凭证时,如何将 svn 存储库导出到 git?
我在文件夹中完整签出了 svn 存储库。但我没有 svn 存储库的凭据(托管在 Unfuddle 中)。我想将此文件夹移至新的 git 存储库 (Github),并保留其所有历史记录和更改。如果可能的话我想保留提交者。 如何将现有的 svn 文件夹导出到 Github?
I have a full checkout of svn repository in a folder. But I don't have the credentials of the svn repository(hosted in Unfuddle). I want to move this folder to a new git repostitory ( Github) with all its history and changes intact . If possible I would like to keep the commiters .
How do I export my exiting svn folder to Github ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
SVN 签出不包括它自己的历史记录,因此您所能做的就是将其视为一组正常的文件。
svn export 将复制除隐藏的 .svn 目录之外的所有文件。 git commit -a 将递归地添加所有内容以更改控制并提交它。当然,系统会提示您输入提交注释。
要将其发布到github,首先在github上创建一个帐户,然后到这里创建一个存储库:
http ://help.github.com/create-a-repo/
假设您将其称为 test 并且您的帐户是 prabesh,因此它的全名是
创建时会在 github 上显示要执行的操作的完整详细信息一个回购协议,但是一旦你的回购协议如果存在,您可以通过注册远程 (github) 存储库并将本地副本推送到其中,将本地 svn 导出的 git 存储库上传到 github:
An SVN checkout does not include it's own history, so all you can do is treat it as a normal set of files.
svn export will copy all the files except the hidden .svn directories. git commit -a will recursively add everything to change control and commit it. You'll be prompted for a commit note, of course.
To publish it to github, first create an account at github, then go here to create a repository:
http://help.github.com/create-a-repo/
Let's say you called it test and your account is prabesh, so it's full name is
The full details of what to do are shown on github when you create a repo, but once your repo exists, you can upload your local svn exported git repo to github, by registering the remote (github) repo, and pushing your local copy to it: