Migrating VCS: Difference between revisions

From ASCEND
Jump to navigation Jump to search
Created page with "Some notes on migrating between version control systems. '''WORK IN PROGRESS'''. '''To migrate a Bazaar repository to Git''' Source: http://librelist.com/browser/cville/2010..."
 
No edit summary
Line 28: Line 28:
Source: http://stackoverflow.com/questions/498110/converting-a-repository-from-git-to-subversion
Source: http://stackoverflow.com/questions/498110/converting-a-repository-from-git-to-subversion


Assume we have a 'bare' Git repository at </tt>/path/to/repo.git</tt>:
Assume we have a 'bare' Git repository at <tt>/path/to/repo.git</tt>:


  svnadmin create svn-repo
  svnadmin create svn-repo

Revision as of 02:53, 17 February 2015

Some notes on migrating between version control systems. WORK IN PROGRESS.

To migrate a Bazaar repository to Git

Source: http://librelist.com/browser/cville/2010/2/9/migrate-repository-bzr-to-git/

To convert a bzr repository to git (cwd: bzr repo): $ git init &&

  bzr fast-export `pwd` | git fast-import &&
  rm -r .bzr &&
  git reset HEAD

This will take your current working directory, build git history, and destroy bzr history. Do not run this on any important bzr branch, as it will get eaten.

But I wanted a 'bare' repository, for future reasons:

cp -R repo-bzr repo.git
cd repo.git
git init --base
bzr fast-export `pwd` | git fast-import
rm -r .bzr
git reset HEAD

Try to replay a Git repo into a new Subversion repo

Source: http://stackoverflow.com/questions/498110/converting-a-repository-from-git-to-subversion

Assume we have a 'bare' Git repository at /path/to/repo.git:

svnadmin create svn-repo
subgit configure svn-repo

Edit the svn.repo/conf/subgit.conf file and in section [git "default"], adjust the repository to give repository = /path/to/repo.git. Then,

subgit install svn.repo

This was tested with a 'linear' repository -- no branches in the original bzr repository.