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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:57:49+00:00 2026-06-16T23:57:49+00:00

My repository has only two branches: default and stable. I made a mess in

  • 0

My repository has only two branches: default and stable. I made a mess in the stable branch but I have no clue on how to fix it.

Current Repository

The default branch is for new feature

92 is the revision created by the maven-release-plugin.
93 commit on stable
94 merge stable into default
95 to 98 commit on default
99 merge default into stable
100 to 103 commit on stable
104 try to fix the mess with a hg merge -r 98

For default I want the head to be 98. For stable I want to go back to a single head including the commit 94 to 98.

  • 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-16T23:57:51+00:00Added an answer on June 16, 2026 at 11:57 pm

    Default‘s head should be 98; is it not? Run hg heads default to get the list of changesets that are heads on the default branch. From your graph, this is 98 and only 98.

    For stable, it sounds like you want to hg merge commits 103 and 104. To do that, update to one of them (hg update 103), then merge the other one in (hg merge 104).

    You’ll still have to take care of commit 93. Did you want to have it in stable also? Or do you want to not have its effects? If you want to have it in stable, just merge it in also.

    If you don’t want its effects in stable at all, what you need to do will differ depending that’s happened to it. Is it just on your local computer, or have you already pushed it upstream? If it’s just on your local computer, running hg strip 93 will remove it from your repository, and it won’t get pushed remotely. To do this, you’ll have to enable the mq extension.

    If you have pushed 93 upstream, you can’t strip it. What you can do, however, is make a commit that undoes the effects of 93 by updating to changeset 93, then running hg backout 93. Then, you can merge your new commit into the stable branch, and it will be as though you never committed 93. 93 will be in your history, but its code changes are gone.

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

Sidebar

Related Questions

I have two branches at my local repository: default and s1 . At default
my co-worker has just create a new branch in the git repository which we
My git repository has three branches, devel , stable and customers/acme_patches . A long
I have a git repository and two branches master and st (branched from master
My git repository has ~2,000 commits. For educational purposes, I have been playing around
I have implemented a sort of Repository class and it has has GetByID ,
I have two tables Boxer and Prospect. Boxers has general stuff like name and
I have a system that has three applications (one windows application and two web
I have a CENTRAL bare repository that has three developer repositories pulling and pushing
My question is this: If I have two heads (branches with changes) in my

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.