Git-svn and Eclipse?
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.)
3 Solutions collect form web for “Git-svn and Eclipse?”
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.
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
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.
SubGit has installed hooks into $GIT_REPO/hooks directory which are triggered on every
git pushto that repository.
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:
- Apache HTTP server with git-http-backend, GitLab, Gitosis, Gitolite: supported out of the box;
- Atlassian Bitbucket Server: in this case you can use SVN Mirror add-on which is built on SubGit engine;
- Gerrit: you’d need to install SubGit plugin for Gerrit in this case;
Disclaimer: I’m SubGit developer; SubGit is commercial software with free options for small teams, Open Source and Academic projects.
Although this question is 4 years old, I thought I would share my recently found workaround:
- Open “External Tools Configurations” (right next to “Run
Configurations”) and create a new “Program” configuration.
- For the working directory, choose your project from the workspace.
svn dcommitinto the arguments textfield.
- Duplicate the configuration and replace
Now you can launch
git svn dcommit and
git svn rebase with two clicks.