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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:21:25+00:00 2026-05-30T16:21:25+00:00

NOTE: This question is inspired by the git-svn branching question and NOT a duplicate!

  • 0

NOTE: This question is inspired by the git-svn branching question and NOT a duplicate!

Without doing anything extraordinary when I checked out our svn-repo I got the following .git/config file:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
    autocrlf = false
[svn-remote "svn"]
    url = svn+ssh://my_server/opt/subversion/main/trunk
    fetch = :refs/remotes/git-svn
[color]
    ui = true

When I try to use git svn branch I get the message:

Unknown branch destination

The reason for this is that branches is missing in .git/config. I whant the branches to go into a directory parallel to trunk. So for example a branch named foo should be found at this path:

svn+ssh://my_server/opt/subversion/main/branches/foo

If I am working in a separate branch made inside of git with git checkout -b foo, I then want to create the branch in subversion with:

git svn branch foo

How do I update .git/config to get this working? I would be expecting a message like the following from git svn branch foo:

Copying svn+ssh://my_server/opt/subversion/main/trunk at r8507 to svn+ssh://my_server/opt/subversion/main/branches/foo...

Edit:
What if I update the svn-remote section to:

[svn-remote "svn"]
    url = svn+ssh://my_server/opt/subversion/main
    fetch = trunk:refs/remotes/git-svn
    branches = branches/*:refs/remotes/branches/*

It looks like its the right thing to do and seems to be working when I have tried to do git svn rebase and git svn branch. Is this a working solution or will I mighty pile of mess if I work with this new config a while?

  • 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-30T16:21:26+00:00Added an answer on May 30, 2026 at 4:21 pm

    You have a problem, because your svn-remote.svn.url is not the root of the repository and to fetch multiple branches it has to be. You can just change it and run fetch, but I am not sure git-svn can use the data it already has in such case. It won’t be worse than re-cloning in any case.

    Your config has to look like. When cloning, you get that by using the -t trunk option.

    [svn-remote "svn"]
        url = svn+ssh://my_server/opt/subversion/main
        fetch = trunk:refs/remotes/trunk
    

    By default, trunk will go directly to remotes, but you can insert some name between, which is cleaner if you also have other remotes. I usually have refs/remotes/svn/trunk.

    If you provided the -b option, you will also have

        branches = branches/*:refs/remotes/branches/*
    

    but if you didn’t, you can add it manually anytime. That’s what you need to have to be able to import branches and to create branches.

    Last the -T option would add

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

    which you can again add anytime later. Note though, that svn tags won’t behave as git tags, they will still behave as branches.

    For convenience the -s option to clone is shorthand for -t trunk -b branches -T tags.

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

Sidebar

Related Questions

(NOTE: This question is not about escaping queries, it's about escaping results) I'm using
Moderator note: This question is not a good fit for our question and answer
(note that this question is not about CAS, it's about the May fail spuriously
Please note: This is a question about the Eclipse plugin Subversive , and not
Note: This question was asked at a time when C# did not yet support
Note this question is similar this one except I'm not working with linq-to-sql, so
Note: this is NOT like this question I've been tasked to construct a survey
Note This is not a question about how to implement or emulate duck typing
Please note this question is specific to WCF Data Services not normal Wcf Service.
Important note : this question is not about the superiority of a bracing style

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.