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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:45:02+00:00 2026-06-12T02:45:02+00:00

I currently have imported a huge project from SVN to Git. I decided to

  • 0

I currently have imported a huge project from SVN to Git.
I decided to flatten out all branches and keep only 2.
Master branch and Diverged branch.

Master: A-B-C-D
               \ X-Y: Bugfix

Diverged: E-F-G-H

The diverged contains a lot of different source code, but some parts still originate from master. When we have to do some bugfixing we have to manually patch Master and Diverged on SVN. I would like to merge Bugfix into master (no problem here) and merge Bugfix into Diverged.

Keep in mind that i dont want the previous commits to be inserted into Diverged from master. So ABCD should be ignored.
The structure im looking for is this:

Master: A-B-C-D-X-Y

Diverged: E-F-G-H-X-Y

Could anyone help me figure this out?

  • 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-12T02:45:03+00:00Added an answer on June 12, 2026 at 2:45 am

    Merging diverged branches is always painful.

    First of all you have to remember some useful git commands that will help you with a monster merge.

    git log HEAD..origin/master – will show you the differences between branches.

    If simple git merge origin/master does not work try to split the merge into a series of smaller tasks. I suggest rebasing your diverged branch on top of the current master, so that the changes will be localized:

    git rebase remotes/origin/master

    You will end up with a boring task of resolving each and every conflict (possibly in many commits), but these small tasks are much simpler then dealing with the whole merge at once.

    Master: A-B-C-D-X-Y
    Diverged: E-F-G-H-X-Y
    
    git checkout diverged
    git rebase master
    

    After rebasing is complete you can fast-forward your master to the tip of the branch:

    Master: A-B-C-D-X-Y
                      \ E-F-G-H
    

    Empty commits will be omitted.
    In the most complex scenarios you can use interactive rebase on your branch to rearrange the commits. I.e, for your scheme:

    Though it is manual work but it is still a divide-and-conquer tactic.

    Read this post for some in-depth ideas: http://blog.springsource.org/2010/12/21/git-and-social-coding-how-to-merge-without-fear/

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

Sidebar

Related Questions

I currently have a git repository that I imported from svn a while ago
I have imported my svn repository to git. My current branch for development is
I have a WPF app that is currently driven completely from XAML. All fields,
I'm currently using git-bzr-ng to import a number of branches from a bzr repository
Currently have a drop down menu that is activated on a hover (from display:none
I currently have one project that currently contains multiple packages. These packages make up
I am trying to pull data from a table I have imported into my
In my project, i have imported some third party frameworks like google-maps. EveryThing work
I'm currently working on a project where we have a large data warehouse which
I'm stepping into an open source project, currently built using Maven2. I imported the

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.