Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8246117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:24:07+00:00 2026-06-07T22:24:07+00:00

We have moved most of our codebase from a monolithic svn repository into a

  • 0

We have moved most of our codebase from a monolithic svn repository into a set of git repositories. For various reasons, some work (on old versions of the project deployed in the field) has to continue in old svn branches, after they have been moved to git and deleted from the subversion trunk.

I have just done some work like this on an svn branch and re-applied the changes from the svn repository into the git repositories by doing the following:

cd <common_svn_commit_root>
svn diff -r 12344:12345 > ~/r12345.diff
gedit ~/r12345.diff
cd <common_git_commit_root>
git apply ~/r12345.diff

but it is rather cumbersome to do this for each and every svn commit, especially the gedit step, where I have to manually munge the svn paths into git paths (usually by prefixing the top level directory name).

One problem with trying some of the options presented so far is that the structure of the old svn repo and the new git repo are different. This is one of the reasons I have to edit the patch file.

The old directory structure was

svn
    configurations
        blah
        mine
        blam
    plugins
        foo
        core
        mine
        bar

Whereas the new structure is

svn
    plugins
        bar
git
    my_git
        my_config
        plugins
            mine
    core_git
        plugins
            core
    foo_git
        plugins
            foo

I would really like to know if there is an easier way to do this, and understand what the best practice is for this situation.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T22:24:10+00:00Added an answer on June 7, 2026 at 10:24 pm

    Assuming that the directory structure of your sources kept the same, I suggest that you add a remote to your old SVN branch :

    $ git config --add svn-remote.svn-branch.url http://my.svn.server/project/branches/my-branch
    $ git config --add svn-remote.svn-branch.fetch :refs/remotes/old-svn-branch
    

    This way, you will be able to track changes on both old SVN branches, and your brand new Git server in local branches, and use git-cherry-pick to apply the commits containing the fixes on your Git server branches.

    EDIT

    Git keeps track of the file moves.

    I did not try it myself, but if you clone the SVN repo, then locally move the directories to match you new Git server structure, cherry-pick merges could apply it on the moved files.

    It already worked for me for some files, but maybe there’s some limitations. It definitely is worth the try.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have moved my classes from a global namespace into a specific namespace. I
I have moved a component of our application from a webservice to a Windows
I have moved my iPhone app from one machine to another. In the process
At some point I must have moved files from one location to another using
We have recently moved some data from an SQL Database instance to another one
I have just moved a site from a dedicated server to a GoDaddy shared
We have a SQL table that is populated with events from our website (mostly
We have exception catching code in most of our event handlers etc, this leads
We have recently moved our project over to TFS 2010 for CM control and
I recently began importing a number of our projects into a Subversion repository at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.