Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting a repository from git to subversion

Reasons for doing this aside, is there a reasonable way to convert an entire git repository to subversion?

I can find only tons on information on migrating from subversion to git, and exchanging changesets between the two, but not for doing a simple conversion of the entire git repository to svn.

like image 819
dF. Avatar asked Jan 31 '09 02:01

dF.


People also ask

Can you use Git for Subversion?

Introduction. 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.

What is difference between SVN and Git repository?

The difference between Git and SVN version control systems is that Git is a distributed version control system, whereas SVN is a centralized version control system. Git uses multiple repositories including a centralized repository and server, as well as some local repositories.

Which is Better Git or SVN?

SVN is better than Git for architecture performance, binary files, and usability. And it may be better for access control and auditability, based on your needs.

Which popular tool can be used to migrate SVN to Git?

There are many tools such as svn2git available to perform the migration, in this tutorial we will focus on git-svn utility: a Git extension , which can be used to check out a Subversion repository to a local Git repository and then push changes from the local Git repository back to the Subversion repository.


1 Answers

The general problem with doing conversions this direction is that Git repositories can contain more than just a linear history of revisions, as Subversion would expect. Multiple ancestries with divergent histories and frequent merge commits are all possible, which can't be easily represented in a Subversion repository.

For simple cases where you do have a linear history in your Git repository, you can use git-svn dcommit to push the lot up to an otherwise empty Subversion repository.

like image 154
Greg Hewgill Avatar answered Sep 21 '22 13:09

Greg Hewgill