5

I am trying to adopt the following workflow:

  1. git svn clone a svn repository through command line (egit doesn't support git-svn)
  2. Open the project in eclipse with egit since I rather use egit to branch, merge, commit etc...
  3. When i'm ready commit the changes back, I use use git svn dcommit to commit back to svn

I am having trouble with step number 2, don't understand how to import a git project, eclipse tells me i can't import it to use the same directory it's currently in because another project with the same name is already there. this is confusing.

Anyone knows how to do this ? Also would like to hear other workflow examples that uses egit and git svn. I am aware that it is better to do it all through command line, however, I am trying to ease the move to git for fellow developers in my team, who are not used to command line interface etc...

1
  • 1
    after testing this a little bit, this is not the best thing to do since when you git svn rebase through the CLI, egit doesn't know about it. after a few seconds it gets updated with changes but still, it's not a good practice. I really wish there was easier way to work inside eclipse with git and svn. some of the people are afraid for some reason of working with command line... Commented May 3, 2012 at 15:18

2 Answers 2

7

I've worked briefly with the egit plugin (I actually recently stopped using it and just use msysgit as my Git guiclient and run it separately from Eclipse). I find Eclipse very busy as is and adding this plugin slows it down (for me at least).

What I did when setting up an already cloned project in Eclipse:

  1. In Eclipse. File -> Import -> Existing Project into Workspace

  2. Select root directory of project. Do NOT check copy projects into workspace. Click finish.

  3. After project has been imported. Right click on project, go to Team -> Share Project

  4. Select Git as a repo type, click next

  5. Check use or create repo in parent folder of project. Since you already cloned the project it will be tracked with git. When you check this option it will show the project, the path, and the repo (.git).

  6. Click finish and you will be all set.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you, I was trying to import a git project, thats why it didn't work.
2

I think you'd better use SubGit instead of git-svn.

SubGit works on a server side. It synchronizes all the modification between Subversion and Git repositories automatically on every incoming modification from either side.

From the client perspective SubGit enabled repository is a usual Git repository, so you may pull from and push to it. Please refer to SubGit documentation or SubGit vs. git-svn comparison for more details.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.