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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:17:53+00:00 2026-05-21T17:17:53+00:00

Okay, I made a mess. I have a SVN repository with my code and

  • 0

Okay, I made a mess. I have a SVN repository with my code and I have a local git repository in which I usually work, branch, etc.. I used to commit things from time to time from git into SVN using git-svn. Now I got a new computer and cloned my git repository from one to the other. I tried to use git-svn afterwards, but due to a new version and me being not careful enough the configuration was somehow lost. So I used git svn init and clone to get back my history in SVN, but now the situation looks like this:

o--Z--o--....--X--o--o....--o  (master)
   |
   o--o--o--....--X (remotes/git-svn)

X is marking a state in which both repositories are in the same state (as master and git-svn where in sync on my old machine). Now, I’d like to commit everything from X to HEAD from master into my SVN repository, but when I use git svn dcommit -n it shows diffs way back to Z. How can I sync git-svn and git and svn again (so that I can use simply dcommit to commit stuff again)?

Is it possible to go back to X and use git svn set-tree X (because the current SVN holds exactly that version) and than go back to HEAD to do the git svn dcommit? I don’t want to (blindly) try stuff on the SVN, as there is a lot of more stuff in it (by many other people) which I don’t want to screw up.

  • 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-21T17:17:54+00:00Added an answer on May 21, 2026 at 5:17 pm

    git svn dcommit looks back in the history of your branch until it finds a commit message that contains a git-svn-id: line, so it’ll go back to Z in your case, as you observe. I would try to rebase your master branch onto remotes/git-svn. I haven’t tested this, but the following would be what I would try:

     # Make sure that you're on master
     git checkout master
    
     # Create a new branch here to save the old branch
     git branch old-master
    
     # Rebase everything after the X on master up to the tip of master
     # onto remotes/git-svn
     git rebase --onto remotes/git-svn <commit-ID-of-X-in-master> master
    

    After that, your history should look like:

    o--Z--o--....--X--o--o....--o  (old-master)
       |
       o--o--o--....--X (remotes/git-svn) --o--o....-o (master)
    

    … and git svn dcommit should work as expected – however, I’d try it with --dry-run first, just to be sure.

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

Sidebar

Related Questions

Okay. I used svn's hotcopy to make incremental back-ups, now how do I test
Okay, I have two different background .jpgs that I want to used as the
Okay so I made some changes to a stored procedure that we have, and
Okay, so I have a Flash CS3 (+ AS3) program which is loading another
Okay, I have made a skybox (it's actually 5 plane, because of the different
Okay the question title may not have made sense... mostly because I don't know
Okay, here's the scenario. I have a utility that processes tons of records, and
Okay so I made this program to help me out with my homework and
I have made a custom control in my application. It is like a combo
Okay, coming from a perl background I am used to Arrays holding refs to

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.