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.
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.
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With