On this page

Related content

Still need help?

This page describes the methods you can use to import code from existing projects into Bitbucket Server. When creating a new repository, you can import code from an existing project into Bitbucket Server using either the terminal or the web interface.

Import code using the web interface

Introduced in Bitbucket Server 4.9, you can import code and its version/branching history into Bitbucket Server from existing Git projects hosted with Bitbucket Cloud, GitHub, GitHub Enterprise, or a standalone Git repository using the web interface.

To start importing code

While viewing a project within Bitbucket Server click Import repository in the sidebar.

Usegit fetch --prune origin ('–prune' will remove any branches that no longer exist in the remote) followed by thegit pushcommands from step 5 to update the Bitbucket Server mirror with new changes from the upstream repository.