Clone a repository

When you clone a repository, you create a copy of your Bitbucket repository on your local system. Cloning also connects the remote and local repositories so that you can start pushing and pulling changes between both places.

Clone a Git repository

You can use the terminal, SourceTree, or any other client you'd like to clone your Git repository. These instructions show you how to clone your repository using Git from the terminal.

  1. From the repository in Bitbucket, click the Clone button.
  2. Click Clone on the left panel and copy the clone command.
  3. From a terminal window, change to the local directory where you want to clone your repository.
  4. Paste the command you copied from Bitbucket, for example:

If the clone was successful, a new sub-directory appears on your local drive with the same name as the repository that you cloned.

Clone a Mercurial repository

You can use the terminal, Sourcetree, TortoiseHg, or any client you like to clone your Mercurial repository. These instructions show you how to clone your repository using Mercurial from the terminal.

  1. From the repository in Bitbucket, click the Clone button.
  2. Click Clone on the left panel and copy the clone command.
  3. From a terminal window, change to the local directory where you want to clone your repository.
  4. Paste the command you copied from Bitbucket, for example:

If the clone was successful, a new sub-directory appears on your local drive with the same name as the Bitbucket repository that you cloned.


Last modified on Feb 22, 2017

Was this helpful?

Yes
No
Provide feedback about this article

Powered by Confluence and Scroll Viewport.