Using git-svn with IDEA

I normally make judicious use of the shelf feature of IDEA in my workflow as I am often working on multiple features at a time.
However, I recently accidentally deleted all my shelves :8} so I thought perhaps I should try using git-svn instead.

I cloned my svn repo with

git svn -s https://my.company.com/my/repo project-git



However, the IDEA project is expecting svn.
Can I switch it to git and use git-svn to create lots of branches then commit back to svn when I am ready?
7 comments

Instead of git-svn, I suggest you to take a look at smartGit 2.1 with better
SVN support.

0

you can use git-svn with Idea. After git svn init, Intellij sees it as a git repository, so you can crate branches, commit etc. within Intellij (commit and push will fail of course),
you'll only need to use git svn rebase/git svn dcommit on command line.

1

Syntevo have an EAP too :) You can get SmartGit 3 EA6 atm.

I prefer to do as much as possible from within IDEA and only use SmartSVN as a backup.
SmartGit recognised that I had used git svn to clone the repo and said something like I had to re-clone it with SmartGit to get the full benefit, so for that and for the reason above I haven't got round to trying it out much yet.

Are there some especially good features that I should be looking at first?

0

Do I have to do git svn init after I have done git svn clone? Or are you just using that as an example when starting from scratch?
The IDEA project in svn is already set up to be svn in the vcs.xml file.
I can't work out from the GUI how to switch it to a git project.

0

Yes, I do "git svn init http://svn.repo", after that "git svn fetch". After this,  Intellij sees it as a git repo.

0

I'm adding support to git-svn to an external plugin 

 

https://github.com/JetBrains/intellij-community/blob/master/plugins/git4idea/src/git4idea/repo/GitConfig.java#L346

That parses a remote, but as it accepts remote or svn-remote and RemoteBean only reads the fetch and push sections, a svn-remote is hidden into a normal remote, so you need to make wrong asumptions about remotes (if it is called svn probably it is a git-svn repo)

Is it possible to add a flag (isGitSvn()) to keep that metadata. RemoteBean could be extended too to have n branches and tags sections (but that is not really important, except for allowing to edit svn config)

0

Please sign in to leave a comment.