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 8215257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:43:18+00:00 2026-06-07T11:43:18+00:00

I have a Subversion server with a few different projects in the standard layout

  • 0

I have a Subversion server with a few different projects in the standard layout like so:

ProjectA/
    trunk/
    branches/
    tags/
ProjectB/
    trunk/
        FolderOfBinaries/
        SourceFolderA/
        SourceFolderB/
        SourceFolderC/
    branches/
    tags/
        v1.0/
        v1.1/
        v2.0/
ProjectC/
    trunk/
    branches/
    tags/

ProjectB is going to be be migrated to Git, but not with a standard clone. I want to split the project into two Git repositories – one for the folder full of large binaries that change relatively often and another repository for everything else. I did a clone of the repository in full and it’s a few GBs, but the binaries folder is probably 90% of that, and running git gc takes a long time. I’d rather have a small fast repository and then add the binaries folder as a submodule if the developer requires it.

I’ve found two potential options so far. First, I could use git branch-filter to try and remove the folder of binaries from the history as shown in the Git Book. Second, I could use svndumpfilter to split the current Subversion repository into two and then git svn clone each separately.

My question is though, what will happen to all the history, and particularly the branches and tags? I’d still like to know what the folder of binaries looked like at every tag in the project, even though the binaries may not have changed between two tags. is that possible?

Edit: The folder of binaries is not full of build artefacts (*.class, *.o, *.dll etc) so I can’t just strip it out and make them external. It’s full of binaries that are output from a third-party program that need to be versioned (think OpenOffice documents, Photoshop files etc.).

  • 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-07T11:43:21+00:00Added an answer on June 7, 2026 at 11:43 am

    Well, I’ve managed to do this, but it wasn’t all that straightforward. There may be a better way but not one that I could work out. I did the following:

    1. Create a dump of the current repository: svnadmin dump /opt/repo > full_dump

    2. Filter the dump to remove the binaries folder: svndumpfilter exclude *folderofbinaries* --pattern --renumber-revs --drop-empty-revs < full_dump > filtered_dump. I needed to make folderofbinaries a pattern because way back in the past someone had actually checked a binary directly into a tag (!) so the next step was failing due to a missing folder.

    3. Create a local SVN repository with the filtered dump:
      mkdir repo-filtered;
      svnadmin create repo-filtered;
      svnadmin load repo-filtered < filtered_dump

    4. Clone both the full and filtered repo into different folders (I used svn2git). The filtered repo will not contain any of the binaries. If, in the full repo, only the binaries folder changed between tags A and B, in the new filtered Git repo the two tags will point to the same commit, which is exactly what I wanted.

    5. In the full Git repo, use Git to strip out everything except the binaries folder.

    The reason that I had to use Git to isolate the binaries folder was because I couldn’t work out how to maintain the tags just using svndumpfilter (especially given I had a binary committed directly into a tag). After the conversion I get the same behaviour as in the filtered repo – if no binaries changed between two tags then they both point to the same commit.

    The commands for the final step were:

    git checkout master
    git filter-branch --tag-name-filter cat --prune-empty --subdirectory-filter folderofbinaries -- --all
    git reset --hard
    git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d
    git reflog expire --expire=now --all
    git gc --prune=now
    

    which I got from this question.

    Now I have an 80MB sources repository and a 1.5GB binaries repository from my original 4.4GB SVN dump file! I can recreate the exact state of the original SVN repo by adding the binaries folder as a Git submodule of the sources repo and checking out the same tag on each (which is why I needed to preserve all the tag info) whilst not having one mammoth Git repo that’s slow to work with.

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

Sidebar

Related Questions

I have a lot of pre-existing projects and code in a few different Subversion
I have a Subversion repository called 'repo'. Inside of repo are trunk/ and branches/
I have a subversion server running with a repository at /srv/repos/project. What i like
I am running a subversion server with access via http using webdav. I have
I've started experimenting with Hudson as a build server. I'm using subversion and have
Many subversion repositories have a trunk subdirectory under the root of the repository. Is
I have been using Subversion for a few days now and have a question...
One of the things I like about the way I have Subversion set up
We have a Subversion server running at the company I work for holding various
I have an subversion server running with Apache mod_dav_svn and it works nicely but

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.