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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:26:46+00:00 2026-05-14T02:26:46+00:00

While working with git-svn, and a ‘typical’ svn repo /trunk, /branches/…, /tags/… How do

  • 0

While working with git-svn, and a ‘typical’ svn repo /trunk, /branches/…, /tags/…
How do I push a local branch to a new branch inside of /branches ?

  • 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-14T02:26:47+00:00Added an answer on May 14, 2026 at 2:26 am

    Say we have a skeleton Subversion repository with empty trunk/, branches/, and tags/:

    /tmp$ git svn clone -s file:///tmp/svn-repo/ git-svn-repo
    Initialized empty Git repository in /tmp/git-svn-repo/.git/
    r1 = 80bdcfc0cf248b74b914a1b5f99ab89fb4e31b6c (refs/remotes/trunk)
    Checked out HEAD:
      file:///tmp/svn-repo/trunk r1
    
    /tmp$ cd git-svn-repo/
    
    /tmp/git-svn-repo$ git svn branch my-branch
    Copying file:///tmp/svn-repo/trunk at r1 to file:///tmp/svn-repo/branches/my-branch...
    Found possible branch point: file:///tmp/svn-repo/trunk => file:///tmp/svn-repo/branches/my-branch, 1
    Found branch parent: (refs/remotes/my-branch) 80bdcfc0cf248b74b914a1b5f99ab89fb4e31b6c
    Following parent with do_switch
    Successfully followed parent
    r2 = 56150bbd9d3aec94972ff46d030e30ec726595ab (refs/remotes/my-branch)

    The explanation below will switch back-and-forth between two views of the same repository, a Subversion working copy of the entire repo (not just trunk) and a git-svn clone. For clarity, each shell prompt’s prefix will indicate the current directory.

    On the svn side, you’ll now see

    /tmp/svn-repo-wc$ svn up
    A    branches/my-branch
    Updated to revision 2.

    You’ll also see the new branch on the git side:

    /tmp/git-svn-repo$ git branch -r
      my-branch
      trunk

    To commit to the newly created branch, first switch to it:

    /tmp/git-svn-repo$ git reset --hard remotes/my-branch
    HEAD is now at 2c9bef2 Create branch my-branch

    Next, we’ll create a dummy git commit

    /tmp/git-svn-repo$ touch on-my-branch
    /tmp/git-svn-repo$ git add on-my-branch
    /tmp/git-svn-repo$ git commit -m 'First commit to my-branch'
    [master b94a0eb] First commit to my-branch
     0 files changed, 0 insertions(+), 0 deletions(-)
     create mode 100644 on-my-branch

    and finally send it to Subversion:

    /tmp/git-svn-repo$ git svn dcommit
    Committing to file:///tmp/svn-repo/branches/my-branch ...
        A   on-my-branch
    Committed r3
        A   on-my-branch
    r3 = d3c5ba3e03e5cdee96f470ff4c9898eb7c523ed8 (refs/remotes/my-branch)
    No changes between current HEAD and refs/remotes/my-branch
    Resetting to the latest refs/remotes/my-branch

    The Subversion working-copy gives us confirmation:

    /tmp/svn-repo-wc$ svn up
    A    branches/my-branch/on-my-branch
    Updated to revision 3.
    • 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' working tree. I'd like to clone a pure git repo
I've got a git-svn checkout of my entire repo (initialized in the standard git
I have a local branch that is tracking of a remote branch on git.
While working in a Java app, I recently needed to assemble a comma-delimited list
While working between a Windows MySQL server and a Debian MySQL server, I noticed
While working on a project, I came across a JS-script created by a former
While working on a C++ project, I was looking for a third party library
While working on an existing project I suddenly got the following error when trying
I use RegexBuddy while working with regular expressions. From its library I copied the
I just ran across this error message while working in C# A property or

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.