Bitbucket – Clone repository from remote to local

You can do it in different way (terminal, source tree, ecc ecc ), we do it buy terminal:

  • open the terminal
  • Go to Bitbucket and connect to you repository
  • Click + in the global sidebar and select Clone this repository under Get to work **
  • Copy the URL that you find on Top Right, it can be a HTTPS or a SSH protocol
  • From a terminal window, change to the local directory where you want to clone your repository.
  • Past the command

    
    git clone https://andrea_pizzigalli@bitbucket.org/beprimeit/cloover-2.0.git
    
    // Where "https://andrea_pizzigalli@bitbucket.org/beprimeit/cloover-2.0.git" is the url copied from the repository
    
    // Once cloned, remember to switch to develop's branch by typing :
     
    git checkout <branch>
     
    // <branch> is the name of the branch es: "git checkout develop "
    // Now make a pull
     
    git pull
     
    //so your local copy is  synchronized with the develop branch, from now when you type
     
    git add .
    git commit -m
    git push
     
    // you push on "develop" branch
    
    

    Pratically the command is “git clone” followed by the url that we had copy before form Bitbucket

  • 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.