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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:59:25+00:00 2026-06-14T01:59:25+00:00

I created a git repository from an existing SVN repo. In the SVN structure,

  • 0

I created a git repository from an existing SVN repo. In the SVN structure, I have the trunk and one branch (say, branch_01). The trunk is at the Revision 8, and the branch code, despite the changes, is updated until revision 4.

After I fetched the SVN repo into a git one, I ended up with the following structure in my git repo:

trunk      A(4)------B(6)---------C(8)

branch_01       D(5)--------E(7)---------F(9)

My question is, how to I rebase branch_01 for the git repo structure be like this?

trunk      A(4)------B(6)---------C(8)
              \
branch_01       D(5)--------E(7)---------F(9)

Thanks in advance.

  • 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-06-14T01:59:27+00:00Added an answer on June 14, 2026 at 1:59 am

    Given your diagram above, where A(4) is 2 commits before the current trunk C(8):

    git rebase --onto trunk~2 branch_01
    

    If the diagram provided is simplified, it would probably be easier to find the explicit hash for the revision 4 commit, and then use that in place of trunk~2 in the command above.

    Note Dmitry’s warning: only do this if you are abandoning the SVN repository. If you intend to continue using git-svn, you don’t want to do this.

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

Sidebar

Related Questions

I've created a bare git repository (Core), cloned from a pre-existing repo (Production) using
Is there a way to create a new git repository from an existing one,
I have two branches in my Git repository: master seotweaks (created originally from master
I have created local linux kernel git repository from which I want to check
I created a repository with git-svn from a big svn repository (git svn clone).
In my repository, I have created tags using the following commands. git tag v1.0.0
I'm using one file from a git repository off of github in a project
I have an SVN repository which was renamed from Project to Project v1. I
I'm trying to move our existing svn repository to git. We don't need to
I'm trying to fetch a read-only git repository from github and have it be

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.