Git-svn 和 Eclipse?

发布于 2024-11-01 07:37:01 字数 67 浏览 2 评论 0 原文

Eclipse 有 git-svn 插件吗?我正在寻找一种使用 Git 处理 SVN 存储库的方法(用于快速分支切换等)

Is there a plugin for Eclipse for git-svn? I'm looking for a way to handle the SVN repo with Git (for fast branch switching etc.)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

秉烛思 2024-11-08 07:37:01

Eclipse 似乎还没有支持 git-svn 的 Git 插件。

EGit 似乎是目前 Eclipse 最活跃、最流行的 Git 插件,但它不支持 git -svn,但没有什么可以阻止您在 Eclipse 中使用 EGit 并通过命令行(或通过 乌龟 git)。

Eclipse bug 315264 是支持 git-svn 的 EGit bug,它看起来 EGit 的维护者愿意实施,但他们还有其他优先事项。因此,如果您想要该功能,请确保您投票支持此错误。

It does not look like there is a Git plugin for Eclipse that supports git-svn yet.

EGit appears to be the most active and popular Git plugin for Eclipse at the moment and it does not support git-svn, but there isn't anything stopping you from using EGit with Eclipse and interacting with git-svn via command line (or via tortoise git for example).

Eclipse bug 315264 is the EGit bug for supporting git-svn, and it looks like something that the maintainers of EGit are willing implement, but they have other priorities atm. So make sure you vote for this bug if you want the feature.

开始看清了 2024-11-08 07:37:01

EGit 是目前 Eclipse 唯一的 Git 插件。它不支持 git-svn。但是有一种方法可以让 EGit 与您的 Subversion 存储库一起工作,并且这种方法可以很好地与任何其他 Git 客户端配合使用。

SubGit 是服务器端解决方案,支持 Git 访问您的 Subversion 存储库以及 Subversion 访问 Git 存储库。您可以参考 SubGit 文档 了解更多详细信息,但总的来说它们非常简单:

$ subgit configure --layout auto $SVN_URL $GIT_REPO
# Adjust $GIT_REPO/subgit/config
#     to specify your branches, tags and other settings
# Adjust $GIT_REPO/subgit/authors.txt 
#     to introduce svn author names to their git counterparts
# Adjust $GIT_REPO/subgit/passwd
#     in case you have no SVN credentials cached on your machine
$ subgit install $GIT_REPO
$ ... translating ... a little git is gonna born right here ... 
$ TRANSLATION SUCCESSFUL

之后:

  1. 您将位于 $GIT_REPO 的 Git 存储库与位于 $SVN_URL 的 SVN 存储库同步;这种同步是可靠的双向的,即 SVN 和 Git 存储库都保持可写,SubGit 负责双方的更改。

  2. SubGit 已将钩子安装到 $GIT_REPO/hooks 目录中,每次 git 推送 到该存储库时都会触发该钩子。

  3. SubGit 轮询 SVN 存储库以获取新修订。

请注意,您的队友可能会使用同一镜像将他们的更改发送到 Subversion 存储库。在这种情况下,您应该设置 Git 服务器,幸运的是,SubGit 支持目前几乎所有可用的 Git 服务器:

免责声明:我是 SubGit 开发人员; SubGit 是一款商业软件,为小型团队、开源和学术项目提供免费选项。

EGit is the only Git plugin for Eclipse at the moment. It doesn't support git-svn. But there is a way to make EGit work with your Subversion repository and this approach works well with any other Git client.

SubGit is the server-side solution that enables Git access to your Subversion repositories as well as Subversion access to Git repositories. You may refer to SubGit documenation for more details, but in general they are quite straightforward:

$ subgit configure --layout auto $SVN_URL $GIT_REPO
# Adjust $GIT_REPO/subgit/config
#     to specify your branches, tags and other settings
# Adjust $GIT_REPO/subgit/authors.txt 
#     to introduce svn author names to their git counterparts
# Adjust $GIT_REPO/subgit/passwd
#     in case you have no SVN credentials cached on your machine
$ subgit install $GIT_REPO
$ ... translating ... a little git is gonna born right here ... 
$ TRANSLATION SUCCESSFUL

After that:

  1. You have Git repository at $GIT_REPO synchronized with SVN repository at $SVN_URL; this sync is reliably bi-directional, i.e. both SVN and Git repositories remain writable and SubGit takes care of changes from both sides.

  2. SubGit has installed hooks into $GIT_REPO/hooks directory which are triggered on every git push to that repository.

  3. SubGit polls SVN repository in order to fetch new revisions.

Please note that your teammates may use the same mirror for sending their changes to Subversion repository. In this case you should setup Git server, fortunately, SubGit supports virtually every Git server available at the moment:

Disclaimer: I'm SubGit developer; SubGit is commercial software with free options for small teams, Open Source and Academic projects.

静水深流 2024-11-08 07:37:01

虽然这个问题已经有 4 年历史了,但我想我应该分享我最近找到的解决方法:

  1. 打开“外部工具配置”(就在“运行”旁边)
    配置”
    )并创建一个新的“程序”配置。
  2. 对于工作目录,从工作区中选择您的项目。
  3. 在参数文本字段中输入 svn dcommit
  4. 复制配置并替换 svn dcommit by svn rebase

现在,您只需单击两次即可启动 git svn dcommitgit svn rebase

Although this question is 4 years old, I thought I would share my recently found workaround:

  1. Open "External Tools Configurations" (right next to "Run
    Configurations"
    ) and create a new "Program" configuration.
  2. For the working directory, choose your project from the workspace.
  3. Enter svn dcommit into the arguments textfield.
  4. Duplicate the configuration and replace svn dcommit by svn rebase.

Now you can launch git svn dcommit and git svn rebase with two clicks.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文