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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:05:56+00:00 2026-05-29T05:05:56+00:00

We have 2 branches: master and free . Most of the code is written

  • 0

We have 2 branches: master and free. Most of the code is written in master and merged into free (not the other way). Now, at some point something went wrong: code that should only be in branch free now appears in master. It seems like somebody merged free into master (or re-based free on top of master) and pushes this. This is silly, but we can’t identify when this happened and which commit (commits) introduces this bug.

I would appreciate any advice on how to recover from this situation.

  • 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-29T05:05:56+00:00Added an answer on May 29, 2026 at 5:05 am

    Finally I recovered the master branch by the following simple steps.

    1. Identify the commit that pointed to a stable branch (before someone did a rebase). I used git checkout master@{YYYY-MM-DD} to identify the head of the master branch before the day it all happened. This turned out the last commit before the merge-commit with free branch (not surprisingly).
    2. Branch off of the stable commit and cherry pick all the master commits (excluding the the merge commit).

    Probably the most important part is the realization that rebase is not so destructive after all. It destroys the history, but not the tree. So, there is always a commit that you can revert to.

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

Sidebar

Related Questions

I have two branches master and exp i tried to cherry pick some of
I have 2 branches: master and branch1 both in local and remote repository. Now
I have two branches: master and bonbon Currently they are at the same point.
Imagine, I have several branches: master, a, b, c ... Now I'm in master
Sometimes I'm working with several branches at once. Say I have branches called master,
I have a following scenario: 3 branches: - Master - MyBranch branched off Master
I have a git repository (at github.com) with two branches: master and gh-pages. I
I have three branches (let's call them master, testing, and feature). All three are
I have two branches I normally work on: master and homepage_buildout. I was recently
I have a 'master' branch and several topic branches. Assume that the master branch

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.