kjo
kjo

Reputation: 35331

git with an svn interface?

Is there a way to interface a git repository using svn's command set?

Context: most of the members of our team want to switch to git from svn for all our new projects, but there are a few dissenters.

I know that it is possible to access an svn repo using git, but I'm looking for the opposite functionality.

Upvotes: 12

Views: 2322

Answers (4)

manojlds
manojlds

Reputation: 301527

If not everyone is comfortable with the move, you can consider having a SVN server and ask whoever wants to use git to use git-svn. Git has a very steep learning curve. So even people who are excited about using Git, might have problems using it and in a project, it can kill your productivity. It is better to have everyone learn git via git-svn, since there is an alternative way to work - through SVN - if needed. If people are experienced with git, the move might be very fruitful. Otherwise, there might be lots of short to medium term problems. I have faced this, and am telling my experience.

Otherwise, TortoiseGit on Windows should be familiar to people using TortoiseSVN. Also, you can alias some of the commands in git from similar SVN commands, so that they seem to do similar things. Like svn revert is not same as git revert, but git reset --hard is kind of equivalent. It is hard to find equivalents most of the time, but you can for a few of them

Upvotes: 3

Stefan Kendall
Stefan Kendall

Reputation: 67892

What I've been doing is using svn as the authoritative source, but all the git developers connect to gitorious while working together on projects. When tasks are complete, someone who is working on a paired task, for example, rebases as necessary and commits to subversion with git svn.

It's not a perfect solution, but it lets you work locally under git with the other git developers, at least.

What you really need to do is get the hold-outs onto git. That seems to be the only real sustainable long-term solution.

Upvotes: 3

crazyscot
crazyscot

Reputation: 12019

Fundamentally no - not without making terrible assumptions and simplifications that are guaranteed to come back to bite you. Moving from a non-distributed to a distributed VCS, and making effective use of it, requires you to change your mindset. http://hginit.com/00.html has some notes on moving from svn to hg which would be similarly appropriate to this case.

Upvotes: 3

Raiv
Raiv

Reputation: 5781

If you are on Windows, you may try TortoiseGit - it has similar interface with TortoiseSVN. But this is GUI similarity, not console commands similarity.

Upvotes: 2

Related Questions