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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:57:01+00:00 2026-06-14T13:57:01+00:00

Today I faced with one problem. My teammate created branch from master. He developed

  • 0

Today I faced with one problem. My teammate created branch from master. He developed one feature in this branch and after that developed two subfeatures in subfeature’s branches. At last he did two refactoring commit of the entire thing. So…

     C--D    E--F             | subfeatures
    /    \  /    \
   B------M1------M2--G--H    | feature
  /
 A-------------------K        | master

Usually we rebase feature branches before no-fast-forward merge it into master. But of course this rebase fails. Rebased feature branch became looking like:

     B'--C'--D'--E'--F'--G'--H'
    /
A--K

Of course pointers of C & D became wrong so I also get two subfeature branches growing ‘from air’. I understand how to fix it if subfeature branches wasn’t merged into feature, but at this time I was confused. I cherry-picked everything in rebased recovery branch and merged all again. Is here a easier way to do it?

  • 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-14T13:57:02+00:00Added an answer on June 14, 2026 at 1:57 pm

    Note that you need a git1.7.6+ for git rebase --preserve-merges to work properly.

    • a rebase --preserve-merges --onto didn’t work before (“git rebase --preserve-merges --onto doesn’t preserve merges“)
    • a rebase --preserve-merges had issue in some instance:
      • see this thread, when both sides of the merge are replayed)
      • “Git: Rebasing Merge Commits ” (post from Alexandru Pasca)

    Long story short: You just completed a merge and somebody has pushed a commit before you were able to push yours. The solution is to make git aware of the merge you did.

    git rebase --preserve-merges <upstream>
    

    or

    git rebase -p <upstream>
    

    But there’s a problem, if your merge had conflicts that you solved they won’t be picked up by the rebase machinery.
    And you will end up resolving the conflicts again … at least this is the case with git version 1.7.5.4

    (That would call for git rerere)

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

Sidebar

Related Questions

Today I faced a problem that there is one memory leak in my iphone
Today we faced a quite simple problem that were made even simpler by the
Today i am faced with a problem that the company i work for is
Today I faced a strange problem in C#. I have an ASP.NET page where
I faced an interesting problem today. I have 4 strings which I need to
Today I faced one question in interview. Is it possible to apply inheritance concept
Today I faced the following problem: I registered a new user on my Joobla
I got an email today saying: In every case that we have examined, this
Today I faced a strange problem. I have an application which is the same
today I faced with very interesting problem. When I try to rewrite xml file.

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.