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

  • Home
  • SEARCH
  • 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 7625237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:09:53+00:00 2026-05-31T05:09:53+00:00

My normal git-svn workflow is to do my work on a local branch, then

  • 0

My normal git-svn workflow is to do my work on a local branch, then merge to master and git svn dcommit from there to record my commits onto the svn trunk.

However, in my current local branch (foo) I’m realizing that this work is going to be around for a while before I feel comfortable committing it to the trunk, and other developers might be involved in it before then. I would like to “back it” by a svn branch, so that my work is on the server.

I’ve created a new svn branch (svnFoo) from the current trunk and I basically want to “move” foo so that when I svn dcommit from it all of its commits get recorded on svnFoo instead of trunk.

What is the best way to do this?

  • 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-31T05:09:54+00:00Added an answer on May 31, 2026 at 5:09 am

    git rebase is your friend here. Assuming you created the local foo branch from the local master branch, and you’ve done a recent git svn fetch so your local Git repository knows about the remote svnFoo branch, the magic command you want is this:

    git rebase --onto remotes/svnFoo $(git merge-base master foo) foo
    

    This will find the commit where you branched foo from master, and replay all the commits from there to the head of the foo branch on top of the svnFoo branch. Subsequent git svn dcommits will commit onto the Subversion svnFoo branch rather than the trunk.

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

Sidebar

Related Questions

My normal pattern is to branch from master, do a ton of work, then
We are using Git and our workflow consists of a 'dev' and 'master' branch
I currently have a following Git workflow local normal git repo -> remote bare
At work we are using a lot of branches in SVN and there are
Can I set hooks for pull/pushing from/to a git-svn managed repository? The situation is
In Git, how can I organize work to track local config files of a
Possibly related to Git - pulling changes from clone back onto the master I
I did a rebase on my branch foo git rebase master Did some conflict
I have a Git repository on my local machine that I cloned from my
In a normal Git merge conflict, the three versions of a file in play

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.