2.4.1. Cloning the poky Repository

Follow these steps to create a local version of the upstream poky Git repository.

  1. Set Your Directory: Change your working directory to where you want to create your local copy of poky.

  2. Clone the Repository: The following example command clones the poky repository and uses the default name "poky" for your local repository:

         $ git clone git://git.yoctoproject.org/poky
         Cloning into 'poky'...
         remote: Counting objects: 416542, done.
         remote: Compressing objects: 100% (98611/98611), done.
         remote: Total 416542 (delta 311104), reused 416377 (delta 310939)
         Receiving objects: 100% (416542/416542), 150.39 MiB | 15.77 MiB/s, done.
         Resolving deltas: 100% (311104/311104), done.
         Checking connectivity... done.
                        

    Unless you specify a specific development branch or tag name, Git clones the "master" branch, which results in a snapshot of the latest development changes for "master". For information on how to check out a specific development branch or on how to check out a local branch based on a tag name, see the "Checking Out By Branch in Poky" and Checking Out By Tag in Poky" sections, respectively.

    Once the local repository is created, you can change to that directory and check its status. Here, the single "master" branch exists on your system and by default, it is checked out:

         $ cd ~/poky
         $ git status
         On branch master
         Your branch is up-to-date with 'origin/master'.
         nothing to commit, working directory clean
         $ git branch
         * master
                        

    Your local repository of poky is identical to the upstream poky repository at the time from which it was cloned. As you work with the local branch, you can periodically use the git pull ‐‐rebase command to be sure you are up-to-date with the upstream branch.