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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:22:30+00:00 2026-06-02T19:22:30+00:00

Last weekend I spent many hours (and many commits) working on a line of

  • 0

Last weekend I spent many hours (and many commits) working on a line of development that I now think is a mistake. I don’t want to throw away the work I did, though; I’d like to leave it in the project history.

Problem is, I’ve merged several times from the mainline of development in my public repository. Therefore, once I push to the public repository, the “mainline” will become the line of development I thought was a mistake. (Plus, everyone’s client complains about new heads popping up everywhere)

How should I handle this case?

  • 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-02T19:22:31+00:00Added an answer on June 2, 2026 at 7:22 pm

    hg rebase is what you’re looking for. You would create a ‘dead-end’ branch, rebase the commits onto there, and then your default branch isn’t affected, but dead-end is still in the repo history.

    There will still be an extra head, but, well, there is an extra head. You can still --close-branch to get rid of it like any other branch.

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

Sidebar

Related Questions

Last night I tried to put together something that I have had working since
Hopefully the last NN question you'll get from me this weekend, but here goes
Last week I created an e-shop with opencart. Now I'm trying to customize the
I asked this last week over the weekend and it got buried in the
I got back from the weekend to discover that somebody ****ahem**** had missed a
Last year, my group developed a web service that included basic search functionality. All
I have spent the whole weekend trying to figure out if there is an
I want to create a program that will take user input and create a
I have a SSRS report that displays totals per weekending for last 10 weeks
Last week I was working on a project. Today, I reopened the project and

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.