Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git with an svn interface?

Tags:

git

svn

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.

like image 862
kjo Avatar asked May 20 '11 13:05

kjo


People also ask

Can I use Git with SVN?

git svn is a git command that allows using git to interact with Subversion repositories. git svn is part of git, meaning that is NOT a plugin but actually bundled with your git installation. SourceTree also happens to support this command so you can use it with your usual workflow.

Is SVN obsolete?

While SVN is no longer the most used VCS, it has managed to establish itself in a few very niche areas. Features like customizable access control to project files and a central server are some reasons why developers may still be using SVN.

Can I use source tree with SVN?

We've designed Sourcetree as a Git and Mercurial client, so that you don't have to work from the command line. If you use SVN, Sourcetree has ways to help you too.

What does SVN mean in Git?

Git SVN is a feature in Git that allows changes to move between a Subversion and a Git repository. Git SVN is a good feature to use if you need to allow changes to go between Git and SVN repositories.


2 Answers

You may try SubGit. Install it on your server and it will provide a linked SVN repository such that any commit to the SVN repository will result into Git push and vice versa. The translation is concurrent-safe and rather transparent: SVN tags are converted to Git tags, branches to branches, svn:ignore to .gitignores and so on.

The instruction is:

$ svnadmin create svn.repo
$ subgit configure svn.repo
$ #edit svn.repo/conf/subgit.conf to specify path to your bare Git repository
$ subgit install svn.repo

That's all. The translation is triggered by hooks which will be added to both SVN and Git repositories.

like image 50
Dmitry Pavlenko Avatar answered Nov 03 '22 00:11

Dmitry Pavlenko


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.

like image 25
crazyscot Avatar answered Nov 03 '22 01:11

crazyscot