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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:29:01+00:00 2026-05-23T22:29:01+00:00

I had master dcommit to (and rebase from) the Subversion trunk . I created

  • 0

I had master dcommit to (and rebase from) the Subversion trunk.

I created an intermediate Subversion branch tc, to merge changes from 2 different branches, using:

git branch master
git svn branch tc -m "Branch for merging"
git checkout -b tcl --track tc
git merge cat #Another branch, whose changes I merged here
git commit -m 'Merged changes from cat branch'
git svn dcommit

Since everything was fine, I wanted to promote this to the trunk. I followed doing:

git branch master
git merge tcl
git svn dcommit

Now, because master was merged from another branch that was pointing to a different Subversion branch, it tries to commit to the Subversion branch tc. I want it committed to the Subversion trunk.

Is there a git svn switch or something like that?

I know my workflow is not the optimal and any suggestions to improve it are welcome too.

  • 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-23T22:29:02+00:00Added an answer on May 23, 2026 at 10:29 pm

    As mentioned in this question, using git merge in a repository with git-svn is not a good idea.

    Instead, what you should have done to “merge” the changes into master is:

    git checkout master
    git format-patch --stdout master..tcl | git am
    git svn dcommit
    

    The problem with git merge in this case is that it also sets the git-svn URL for master to the SVN tc branch. The format-patch and am combination only takes the changes themselves.

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

Sidebar

Related Questions

I recently converted a subversion repo, which had been converted from cvs before that
I was trying to merge a dev branch into master. git checkout master git
I had a working solution using ASP.NET MVC Preview 3 (was upgraded from a
I have a repository where I had been working on master branch having last
I have my master branch and my verydifferentbranch these had the same ancestor ...
I have a git repo hosted on my server using gitosis. I had branches
I had to delete all the rows from a log table that contained about
I had a boss, past-tense, who decided to put svn branches in the same
I'm currently writing my master thesis and I'm using TortoiseSVN to keep a backup
Coming from an svn background, I had this question: git equivalent of svn status

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.