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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:23:26+00:00 2026-05-30T14:23:26+00:00

I want to clone a SVN tree into a git repo using git-svn. I’d

  • 0

I want to clone a SVN tree into a git repo using git-svn. I’d like to make a complete clone, including tags and branches, but I hit a problem with the tags organization.

the SVN tags folder looks like this:

tags/
|-- Backup
|   |-- 20080212
|   `-- 20080217
|-- V4.0.1
|-- V4.0.2
`-- V4.0.3

I know about git svn clone -T trunk -b branches -t tags/Backup -t tags with twice the -t option, but this is not entirely satisfying:

$ git branch -r
  tags/20080212
  tags/20080217
  tags/Backup
  tags/V4.0.1
  tags/V4.0.2
  tags/V4.0.3
  trunk

As you can see, all the tags are here, but one is too much: the Backup tag is actually not a tag but a folder containing tags. The problem is that it creates an orphan branch which duplicate the content of all the backup branches.

The question is: How do I make git-svn ignore the backup folder but know about the backup subfolders as tags, keeping the classical tags available?

And as a bonus: how to automatically name the Backup tags as Backup/20080217 instead of 20080217?

Thanks!

  • 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-05-30T14:23:27+00:00Added an answer on May 30, 2026 at 2:23 pm

    git svn isn’t intelligent enough to be able to ignore the Backup folder in one group of tags but include its subfolders. You’ve a bunch of options, none of which are great:

    • Change the underlying Subversion repository to move all the tags into subfolders, so your repository looks something like this:

      tags/
      |--Backup/
      |  |--20080212
      |  `--20080217
      `--Versions/
         |--V4.0.1
         |--V4.0.2
         `--V4.0.3
      

      You can then use -t tags/Backup -t tags/Versions to pick up all the tags.

    • Cope. While irritating, the way Git manages tree objects means having a “Backup” tag won’t actually take any more space or slow down most Git operations; the only impact will be git svn fetches will take longer.

    • Write your own patch for git-svn to enable handling this scenario. Bonus points if you get it included in future official Git releases.

    Getting the tags to have a different name is fairly easy, at least. If you edit your .git/config file, you should find a line that looks something like this:

    tags = tags/Backup/*:refs/remotes/tags/*
    

    You should be able to change this to the below instead:

    tags = tags/Backup/*:refs/remotes/tags/Backup/*
    

    If you do this between running git svn init and the first git svn fetch, everything should just work. Otherwise, you may need to manually remove the old references first, by deleting any files or folders with a name matching the tag name in .git/logs/refs/remotes/tags/, .git/svn/refs/remotes/tags/ and .git/refs/remotes/tags.

    I have no idea what will happen if you have a tag called “Backup” and a folder of tags called “Backup”, though. I suspect nothing good. You’ll need to find some way of avoiding that, or store the Backup tags in a folder with a different name.

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

Sidebar

Related Questions

I've got a git-svn clone of an svn repo, and I want to encourage
I have a 3 year old svn repo I just converted to git using
I have a git svn repository. git svn clone http://myrepo/ myrepo I dont want
I have a production SVN repository that i want to clone with git. when
A git svn clone with --stdlayout get me multiple branches if the source SVN
I want v0.1.27 of nodejs code base. This is what I did. git clone
Is there a way to clone HTML elements using JQuery? However, I want to
I am using git to develop against a project hosted in subversion, using git-svn:
cloning an svn repository into git is easy with git-svn. However, I need to
I'm using git-svn to work against svn repository. The layout is standard, and I

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.