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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:26:58+00:00 2026-05-27T23:26:58+00:00

I have a local ref that contains a few branches that I recently performed

  • 0

I have a local ref that contains a few branches that I recently performed git rebase on:

A---B---C---D master
     \
      E---F---G topic1
               \
                H---I---J topic2

Which turned it into:

A---B---C---D master
             \
              E'---F'---G' topic1
                         \
                          H'---I'---J' topic2

by using the following set of commands:

git checkout topic1
git rebase master
git checkout topic2
git rebase topic1

The problem?

I accidentally forgot to do git rebase --no-ff in order to keep track of all of my previously merged branches. Now, I have no way of easily telling (by using gitk --all) where my merges occurred. I know that they happened somewhere between HEAD@{E} and HEAD@{J}, but without going through each commit individually, I’m lost.

What I have decided to do:

So, I figured that I would use git reflog as suggested here, along with git reset --hard HEAD@{#} to revert back to the original state before the two rebases occurred and then attempt to git rebase branchname --no-ff as I suggested.

My ultimate question is this (with a few additional):

Can I simply go all the way back to the last commit before the first rebase or do I need to rollback each of the rebases individually? Will each of the top branches be exactly as I used to have them (showing the non-fast forwarded merges that I’m looking for)? Am I making this too difficult/is there a simpler way to do this? Anything I’m neglecting to think about?

Thanks.

  • 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-27T23:26:59+00:00Added an answer on May 27, 2026 at 11:26 pm

    If you reset each branch to the commit it was on before the rebase of that branch occurred, it will be like the rebase never happened. Each branch has its own history independent of any other branch, so you will need to reset each branch individually.

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

Sidebar

Related Questions

I have a local git repository which tracks a remote SVN repository via git
I have a local Git repository I've been developing under for a few days:
We have a problem/misunderstanding with our current git setup. We have local master and
I have some local changes to an open source project which uses Subversion as
I have a local user, which is member of Administrators local group. When I
I have a local git repository created with git svn clone . I make
I have a few applications which use a single Web Service which resides on
I have been trying to create a new raster object that contains only a
I have a local branch foo that started life as a branch off of
I have three projects under another project of which each contains one namespace. Now

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.