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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:02:18+00:00 2026-05-22T15:02:18+00:00

I forked someone elses repository on Bitbucket and made some changes (and pushed them

  • 0

I forked someone elses repository on Bitbucket and made some changes (and pushed them to my forked repo). In the meantime, the original author made substantial changes (pretty much a rewrite).

I want to update my repo to be exactly the same as his (but with my changes still present on that tag) in a way that he can easily pull my new changes without the previous changes I made affecting anything.

I pulled his changes into my local version, which left me with 2 heads. I want to just take his head as the tip/default. I tried to resolve this (based on some SO answers) by doing:

hg update -r [myrev]
hg commit --close-branch
hg update -r [hisrev]

This seemed to put me in a state I wanted. My working directory looks like his. However, when I tryed to hg push I’m told this will create multiple remote heads, and I’m not sure if this is what I want (the message makes it sound scary!)

So, have I done this correctly? Should I force the push? Will this do what I want (eg. keep a copy of my changes so I can get to them, but in a way that generally won’t interfere?). If so, was this the best way to achieve this?

  • 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-22T15:02:19+00:00Added an answer on May 22, 2026 at 3:02 pm

    Heads on a closed branch are still heads, so if you want to push those changes you’ll need --force.

    The other option, is to merge that head into what you want to be your default branch, but select none of its changes. This can be done non-interactively using:

    hg update [hisrev]
    hg --config ui.merge=internal:local merge [myrev]
    hg commit
    

    You’ll be down to one head, and it will have only his content, but yours is still available in the history.

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

Sidebar

Related Questions

Someone forked a Github project of mine and made some changes. How can I
I have a repository on github, and someone else has forked it and made
I have forked the git repository of a project on Github and made my
I forked someone's repository on GitHub and would like to update my version with
Say someone clones repository A which results in repository B and then I clone
I've forked a project. I've also added handle 'upstream' that points to the original
I've never forked a project before so I'm a little stumped as to how
I'm about to be forced to write a script to download some number of
I had asked some questions about developing an online judge sometime ago on stackoverflow
I was helping someone with their homework and ran into this strange issue. The

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.