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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:00:45+00:00 2026-06-06T15:00:45+00:00

I had a local topic branch based off a remote branch on the git

  • 0

I had a local topic branch based off a remote branch on the git repo:

1 - 2 - 4 - 5 - 9 - 11  master
      \
        3 - 6 - 8 - 12  remote branch
              \
                7 - 10  my topic

The remote branch was recently rebased off master:

1 - 2 - 4 - 5 - 9 - 11  master
                       \
            ?            3' - 6' - 8' - 12'  remote branch
              \
                7 - 10  my topic

I would like to rebase my topic branch off the head of the remote branch so that I can eventually merge my changes back into the remote. However, because the hash of the parent commit has changed, trying a simple

$ git rebase origin/remote_branch

results in a number of conflicts in files I’ve never touched.

Is there anything I can do to clean up these branches?

  • 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-06T15:00:46+00:00Added an answer on June 6, 2026 at 3:00 pm

    Simply rebasing on origin/remote_branch is confusing for git because it tries to rebase outdated commits on the tip of remote_branch, which leads to duplicate commits and conflicts.

    Instead you must plug off and on, to the new point commit related to the sixth one, using the --onto option

    git rebase --onto <6'-SHA> <6-SHA> my-topic
    

    <6'-SHA> and <6-SHA> are respectively the new and old ids of the commit where my-topic was created.

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

Sidebar

Related Questions

I had a local branch which was branched off master quite some time ago,
I had some conflicts between my local repo and the remote repo. So, I
My local repo was looking like that before I had to pull: [my commit
im writing a script to get services from local and remote machines. I've had
I had a lot of local changes. I just accidentally did git merge another_branch
I had this code @Local interface IRepo { //... } @Stateless class Repo implements
My colleague merged some change for a production hotfix into his local master branch
I'm working on a git deploy server. I had to reset my local head
I have worked within a web development company where we had our local machines,
I had tons of gems on my local machine which I were installed before

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.