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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:08:29+00:00 2026-05-27T11:08:29+00:00

I had a local branch which was branched off master quite some time ago,

  • 0

I had a local branch which was branched off master quite some time ago, on which there were several commits. I wanted to get this local branch up to date with master so I did

git co my_branch
git rebase master

expecting this to replay the commits in my_branch on top of master. However, it seems to have instead merged the commits in my_branch into master and then brought my_branch forward to the same place as master, i.e. I’ve gone from this:

A -- B -- C -- D master, origin/master
      \
       E -- F my_branch

to this:

A -- B -- E -- F -- C -- D master, origin/master, my_branch

when I was expecting this:

A -- B -- C -- D master
                \
                 E' -- F' my_branch

My question is not so much why it did this, but whether I can put things back to where they were originally, since presumably the inserted commits will be problematic when interacting with the remote repository (to which subsequent commits have been pushed).

Edit

It turns out that I had already merged in the branch. So, the rebase had nothing to do and just left the my_branch pointer in same place as master.

  • 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-27T11:08:30+00:00Added an answer on May 27, 2026 at 11:08 am

    As mentioned in my edit above, it turns out I had already merged in my_branch. So, the branch commits were already part of master, and the rebase had nothing to do after moving the my_branch pointer to the last commit in master.

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

Sidebar

Related Questions

I had a local topic branch based off a remote branch on the git
My colleague merged some change for a production hotfix into his local master branch
I had tons of gems on my local machine which I were installed before
I had a repository that had some bad commits on it (D, E and
Today I had to work with a remote branch called origin/}__test_syntax_error_in_simpack_settings . I wanted
I accidentally pushed some changes to the main branch which weren't ready, so I
I had created a local throw-away branch temp , and accidentally called git push
I have worked within a web development company where we had our local machines,
I had a working Active Admin app working on my local server, but after
I had no problem at all running the following code on a local server,

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.