_CloningMirror
You can use Sourcetree, Git from the terminal, or any client you like to clone your Git repository. These instructions show you how to clone a mirrored repository using Git from the terminal. Read more about Smart Mirrors.
- Navigate to the repository in Bitbucket Data Center.
- Click the Clone button.
- If mirrors are configured, use the Clone from dropdown to select the mirror closest to you–the clone URL changes.
- Copy the clone URL (either SSH or HTTPS).
If you are using the SSH protocol, ensure your public key is correctly configured. - Launch a terminal window.
- Change to the local directory where you want to clone your repository.
Enter
git clone
followed by the copied clone URL.
The command and clone URL together would look like this:$ git clone ssh://git@bitbucket-au.example.com:7999/upstream/PROJ/repo.git
If the clone was successful, a new sub-directory appears on your local drive. This directory has the same name as the Bitbucket repository that you cloned. The clone contains the files and metadata that Git requires to maintain the changes you make to the source files.