How to push from a bitbucket repository to a bitbucket repository?

I want to push from a bitbucket repository to another one.

The steps I did were these:

1. imported from (as I could not find the clone option)

2. Cloned to a local reposotiry using TortoiseHG.

3. Added some files, and locally committed using TortoiseHG.

4. Pushed the commit changes to using TortoiseHG.

Now I want to push the changes from back to but I can't find that option in the bitbucket UI anywhere.

How can I do that?

(I probably did something wrong, so if the above steps are not the right ones, please explain what I should have done to make the final push).

2 answers

1 accepted

0 votes
Accepted answer

I'm going to write this up as an answer as the whole process of solving it might benfit others too.

To cut things short: it is not the solution, but the journey that usually the best teaching aid.

The answer will be edited over time to show the progression, and the points and reasons of failure.

After reading the documentation in the answer by Mary Anthony (thanks Mary!), I was hoping it was relatively straightforward to fix this, so I tried these steps, and they failed:

  1. Delete
  2. Fork into
  3. Skip cloning, but keep the existing local repository
  4. In that local repository, start the TortoiseHG Workbench
  5. From the Sync toolbar, perform these: "pull incoming changes", "check for outgoing changes" (basically all), then "push outgoing changes"
  6. At, perform a compare to
    Which resulted in an error : 65ce5e8e2efb & 000000000000 are unrelated.
    which I think patches might be able to solve:
    The reason of the failure is that somehow the changesets are not linked (probably because both repositories have different identities: I'll need to sort that out further)

The second was is using Patch Queues (after reading the external documentation referenced from This appeared to difficult to do.

The third try is to locally work with patches. That also failed with a similar message: 0a23cca9cf3c & 000000000000 are unrelated.


I created a new question from the error message in the final step:

That resulted in a great response by Atlassian with two support tickets.

In the end, the problem was that the source repository was empty, therefore had a nullid as first change-set. That resulted in the fork never to be able to be pushed/pulled back to the original.


  1. Make a backup of the badly forked repository
  2. Delete the badly forked repository at bitbucket
  3. Start with a non-empty source repository
  4. Fork the source repository
  5. In the fork repository, commit changes
  6. Create a pull request for those changes

The two support tickets have goals to:

  • prevent forking empty source repositories
  • provide an initial commit for new repositories to they cannot be empty

Thanks Marcus Bertrand for those!


It sounds like you should have just

  1. Forked this repo:
  2. Cloned your fork to a local repository using TortoiseHg
  3. Added/changed some files and commit to the fork.
  4. Push to the remote fork.
  5. Make a pull request back to Nick's original repo.

These steps are pretty much documented on this page.

Your commits don't look too heavy, you might be able to simply do the fork and replicate the changes manually.


When performing the compare step (right before the pull request), I get a message "0a23cca9cf3c & 000000000000 are unrelated." so I asked a new question about that:

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Canada

Happy New Year - First AUG of the year - great success

Hi Everyone, Hope everyone had a great holiday season and is ready for an exciting 2019.  We had our first AUG last night featuring Tempo Timesheets.  A great presentation and lots of int...

17 views 0 1
View post

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you