I created the main repository, cloned another repository into it and assigned it as a sub repository.

But when I push the main repository in bitbucket, I get the error:

pushing to https://bitbucket.org/user/main-repo

pushing subrepo Assets \ Plugins \ GameFramework to https://bitbucket.org/user/main-repo/Assets/Plugins/GameFramework

searching for changes

interrupted: repository is unrelated (in subrepo Assets \ Plugins \ GameFramework)

Now, for some reason, in my error, I simply write "repository is unrelated".

Strange, but if, after an error, to strip all the commits in the bitbucket repository and again to push, then everything will work. I shot a video of my actions https://youtu.be/WI86_3I2ZH0

What is the problem?

    1 answer 1

    Need to change the .hgsub file. By default, TortoiseHG creates a file of the following format:

    [folder to sub repo] = [folder to sub repo] 

    Need to change this to:

     [folder to sub repo] = [sub repo url]