将 git-svn 用于已签出的 svn 存储库
我查看了一个开源项目的 svn 存储库。现在我做了一些自定义更改,我想将这些更改存储在 git 存储库中。
据我了解,这可以通过 git-svn 来完成。但是,由于我已经检查了 svn 并修改了我的工作副本,是否仍然可以在这里从 git-svn 开始?
我找到的所有关于 git-svn 的资源都是从 svn 的克隆/签出开始的。
感谢您的帮助!
I have checked out an svn repository of an open source project. Now I have made some custom changes and I would like to store these changes in a git repository.
As far as I have understood, this can be accomplished with git-svn. However, as I have already checked out the svn and modified my working copy, is it still possible to start with git-svn here?
All resources about git-svn that I have found start with a clone/checkout of the svn.
Thanks for your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
复制您的修改,按照建议进行克隆签出,复制回来,然后提交。只是不要忘记 gitignore .svn 目录以及您通常会忽略的任何生成的文件
Copy your modifications away, do the clone checkout as suggested, copy back and then commit. Just don't forget to gitignore .svn directories in addition to any generated files you would normally ignore
正如您所提到的,您将需要克隆/签出 SVN 存储库。您的 SVN 存储库的本地副本不包含您稍后在 git 存储库中需要的历史信息。如果您只想将更改应用到新的 git 存储库中,您可以这样做。只需打一个补丁,创建 git 存储库,然后在那里应用补丁即可。
You're going to need to do the clone/checkout of the SVN repository as you mentioned. Your local copy of the SVN repo doesn't contain the history information you're going to want in your git repo later. If you want to apply your changes only in your new git repo, you can do that. Just make up a patch, create the git repository, and then apply the patch there.