Search code examples
gitsvngit-svn

How to synch to svn remote after restructuring the git code locally?


I have checked out svn code to my local git via git-svn and made lots of restructuring on it. Now my current git master is clean and fine. Currently in the svn we are not having any trunk, branches, tag struture. Now I want to clean my svn in the same way.

So to standardize that I created a folder struture like below in svn via svn client and deleted the contents on it.

--My_Project_in_SVN
  --trunk
  --branches
  --tags

But previously we had our code just under My_Project_in_SVN. Now I removed all the contents under the project path. My objective is to commit my local git master code to My_Project_in_SVN\trunk And needs to create separate branches/tags in git which should go to respective branch under svn?

How can I achieve this?


Solution

  • I think the easiest option would be to checkout your new SVN trunk, then copy all files from your Git repository (except of .git of course) to the checkout directory and make an SVN commit. Then do a fresh git-svn clone of your SVN repository which will be quite fast as there will only be one commit.