Lebowtech Blog

Convert Existing Git Repo to Svn

| Comments

Git is great for starting a project quickly but the office uses svn. Here is how I add my existing git repository to a new svn repo.

make svn from git
1
2
3
4
5
6
7
svn mkdir --parents  svn://repo/trunk svn://repo/branches svn://repo/tags
git svn clone -sA authors.file  svn://repo
cd repo
git checkout -b trunk trunk
git rebase master
git rebase remotes/trunk
git svn dcommit

First thing we do is make the new svn repository.

Then clone into our existing git repository, repo

Next we checkout the trunk, and rebase our existing work onto it.

Now we move master to point back to trunk, and push changed to svn.

Comments