Skip to content

Importing a repository

To move a repository from another forge with its whole history, create an empty project, then push everything to it with the import push option:

git clone --mirror <old-url> project.git
cd project.git
git push --mirror -o import <new-url>

An import is quiet: it sends no notification and no web-hook, logs no activity, and starts no build. The checks that run before a push still apply, such as the plugins that refuse unsigned commits or new branches, if the project enabled them.

SourceLab refuses the push, and changes nothing, unless:

  • you are an admin of the project;
  • every branch and tag you push is new to the project: an import adds history, and can't replace history that is already there;
  • you push to the project's main repository.

Later pushes are ordinary ones, with notifications and builds.