将SVN结帐转换为使用git(git-svn) [英] Convert an SVN checkout to use git (git-svn)

查看:352
本文介绍了将SVN结帐转换为使用git(git-svn)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用保存在svn中的软件进行版本控制。我想使用git(git-svn),但是该软件在使用前需要大量的设置和配置。有些工具可以处理所有的设置,包括通过svn检查所有的代码。



git-svn的所有文档(我已经能够找到)需要使用git-svn进行全新结账。



有没有办法将现有的svn checkout转换成可以使用git-svn?

解决


  1. 使用git-svn完成SVN树的完整克隆,到一个临时目录。确保使用与现有结帐完全相同的版本。

  2. 将git-svn结帐顶层的.git文件夹移动到SVN结帐的顶层。

  3. 然后你需要告诉Git忽略.svn目录,或者你可以全部删除它们。

  4. 删除git -svn checkout。

  5. 现在,您可以使用Git和git-svn来操作现有文件。

  6. 做一个git status并希望它表示没有变化。


I work with software that is kept in svn for version control. I would like to use git (git-svn) however the software requires lots of setup and configuration before it can be used. There are tools that take care of all of the setup, including checking out all the code via svn.

All the documentation for git-svn (I've been able to find) requires a fresh checkout, using git-svn.

Is there a way to convert an existing svn checkout so it can use git-svn?

解决方案

You could do something like this:

  1. Do a full clone of your SVN tree using git-svn, to a temporary directory. Make sure you use the exact same revision as your existing checkout.
  2. Move the ".git" folder from the top level of the git-svn checkout into the top level of the SVN checkout.
  3. Then you'll either need to tell Git to ignore the ".svn" directories, or you can delete them all.
  4. Delete the git-svn checkout.
  5. There, now you can manipulate your existing files with Git and git-svn.
  6. Do a "git status" and hope that it says there are no changes.

这篇关于将SVN结帐转换为使用git(git-svn)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆