Skip to content

Migrating From BitBucket

starkos edited this page Apr 10, 2021 · 2 revisions

⚠️ We have a new website! Visit now for the most update to date documentation.
       This wiki is no longer being maintained.


If you have not made any local changes to your fork of Premake, the easiest thing to do is to simply create a new clone from the premake-core repository on GitHub and carry on as before.

If you do have local changes, you can fork the new premake-core repository here on GitHub to a local repository, add your existing Mercurial repository as a remote, and then pull all of the local changes from there. The result will be a mirror of your Mercurial fork on git.

The steps below assume you want to host your fork on GitHub for convenience, but you can follow the same procedure to migrate to a BitBucket hosted git repository as well.

  1. Create a GitHub account if you don't have one already.

  2. Go to https://github.com/premake/premake-core and 'fork' (in the top right). Create the fork under your personal namespace, or wherever you like.

  3. Clone your new fork in to a local repository (GitHub has lots of help if you need it).

  4. Install https://github.com/felipec/git/wiki/git-remote-hg according to the directions (just put the script somewhere on your $PATH).

  5. In a shell ('Git Bash' if you're a Windows user), navigate to your clone.

  6. Add your Mercurial repository as a remote, and then pull over the changes.

git remote add bb "hg::ssh://[email protected]/YourBBUser/premake-dev" (or use https if you prefer)
git pull bb --all

Your clone will now have 2 remotes: 'origin' which is your new GitHub fork, and 'bb' which is the BitBucket fork. You can browse the branches of both remotes in the repo-browser/log.

Create local branches from your BitBucket remote, and then when you push to origin, the work you had in BitBucket will be mirrored in your git repository.

You're done!

If that doesn't go according to plan, come visit us in the discussion forums and we'll be glad to help.

Clone this wiki locally