diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-16 10:57:16 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-17 10:09:35 +0100 |
| commit | fc876832cb57a1a3e61150778a9cfd7acffbc2b6 (patch) | |
| tree | 2219c8a646dd205f0f3e515f1a7c7e4e78b8a6ed /documentation/overview-manual/overview-manual-development-environment.rst | |
| parent | dd8c9b74d3b46aed6d1315af83769ff29109b65a (diff) | |
| download | poky-fc876832cb57a1a3e61150778a9cfd7acffbc2b6.tar.gz | |
sphinx: overview-manual: Various URL, code block and other fixes to imported data
(From yocto-docs rev: 3325fe660dfea24fba2f964a0060664e3c67459a)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/overview-manual/overview-manual-development-environment.rst')
| -rw-r--r-- | documentation/overview-manual/overview-manual-development-environment.rst | 151 |
1 files changed, 77 insertions, 74 deletions
diff --git a/documentation/overview-manual/overview-manual-development-environment.rst b/documentation/overview-manual/overview-manual-development-environment.rst index f89e9b9dd4..273e1027da 100644 --- a/documentation/overview-manual/overview-manual-development-environment.rst +++ b/documentation/overview-manual/overview-manual-development-environment.rst | |||
| @@ -50,8 +50,7 @@ Community | |||
| 50 | The Development Host | 50 | The Development Host |
| 51 | ==================== | 51 | ==================== |
| 52 | 52 | ||
| 53 | A development host or `build | 53 | A development host or :term:`Build Host` is key to |
| 54 | host <&YOCTO_DOCS_REF_URL;#hardware-build-system-term>`__ is key to | ||
| 55 | using the Yocto Project. Because the goal of the Yocto Project is to | 54 | using the Yocto Project. Because the goal of the Yocto Project is to |
| 56 | develop images or applications that run on embedded hardware, | 55 | develop images or applications that run on embedded hardware, |
| 57 | development of those images and applications generally takes place on a | 56 | development of those images and applications generally takes place on a |
| @@ -68,8 +67,9 @@ set it up as the development host by using | |||
| 68 | to set up a CROPS machine, you effectively have access to a shell | 67 | to set up a CROPS machine, you effectively have access to a shell |
| 69 | environment that is similar to what you see when using a Linux-based | 68 | environment that is similar to what you see when using a Linux-based |
| 70 | development host. For the steps needed to set up a system using CROPS, | 69 | development host. For the steps needed to set up a system using CROPS, |
| 71 | see the "`Setting Up to Use CROss PlatformS | 70 | see the |
| 72 | (CROPS) <&YOCTO_DOCS_DEV_URL;#setting-up-to-use-crops>`__" section in | 71 | ":ref:`dev-manual/dev-manual-start:setting up to use cross platforms (crops)`" |
| 72 | section in | ||
| 73 | the Yocto Project Development Tasks Manual. | 73 | the Yocto Project Development Tasks Manual. |
| 74 | 74 | ||
| 75 | If your development host is going to be a system that runs a Linux | 75 | If your development host is going to be a system that runs a Linux |
| @@ -78,8 +78,8 @@ for use with the Yocto Project. You need to be sure that the Linux | |||
| 78 | distribution on the system is one that supports the Yocto Project. You | 78 | distribution on the system is one that supports the Yocto Project. You |
| 79 | also need to be sure that the correct set of host packages are installed | 79 | also need to be sure that the correct set of host packages are installed |
| 80 | that allow development using the Yocto Project. For the steps needed to | 80 | that allow development using the Yocto Project. For the steps needed to |
| 81 | set up a development host that runs Linux, see the "`Setting Up a Native | 81 | set up a development host that runs Linux, see the |
| 82 | Linux Host <&YOCTO_DOCS_DEV_URL;#setting-up-a-native-linux-host>`__" | 82 | ":ref:`dev-manual/dev-manual-start:setting up a native linux host`" |
| 83 | section in the Yocto Project Development Tasks Manual. | 83 | section in the Yocto Project Development Tasks Manual. |
| 84 | 84 | ||
| 85 | Once your development host is set up to use the Yocto Project, several | 85 | Once your development host is set up to use the Yocto Project, several |
| @@ -95,8 +95,8 @@ methods exist for you to do work in the Yocto Project environment: | |||
| 95 | within a shell-based environment using components and tools available | 95 | within a shell-based environment using components and tools available |
| 96 | through your Linux distribution and the Yocto Project. | 96 | through your Linux distribution and the Yocto Project. |
| 97 | 97 | ||
| 98 | For a general flow of the build procedures, see the "`Building a | 98 | For a general flow of the build procedures, see the |
| 99 | Simple Image <&YOCTO_DOCS_DEV_URL;#dev-building-a-simple-image>`__" | 99 | ":ref:`dev-manual/dev-manual-common-tasks:building a simple image`" |
| 100 | section in the Yocto Project Development Tasks Manual. | 100 | section in the Yocto Project Development Tasks Manual. |
| 101 | 101 | ||
| 102 | - *Board Support Package (BSP) Development:* Development of BSPs | 102 | - *Board Support Package (BSP) Development:* Development of BSPs |
| @@ -105,11 +105,9 @@ methods exist for you to do work in the Yocto Project environment: | |||
| 105 | hardware. To development BSPs, you need to take some additional steps | 105 | hardware. To development BSPs, you need to take some additional steps |
| 106 | beyond what was described in setting up a development host. | 106 | beyond what was described in setting up a development host. |
| 107 | 107 | ||
| 108 | The `Yocto Project Board Support Package (BSP) Developer's | 108 | The :doc:`../bsp-guide/bsp-guide` provides BSP-related development |
| 109 | Guide <&YOCTO_DOCS_BSP_URL;>`__ provides BSP-related development | ||
| 110 | information. For specifics on development host preparation, see the | 109 | information. For specifics on development host preparation, see the |
| 111 | "`Preparing Your Build Host to Work With BSP | 110 | ":ref:`bsp-guide/bsp:preparing your build host to work with bsp layers`" |
| 112 | Layers <&YOCTO_DOCS_BSP_URL;#preparing-your-build-host-to-work-with-bsp-layers>`__" | ||
| 113 | section in the Yocto Project Board Support Package (BSP) Developer's | 111 | section in the Yocto Project Board Support Package (BSP) Developer's |
| 114 | Guide. | 112 | Guide. |
| 115 | 113 | ||
| @@ -118,11 +116,10 @@ methods exist for you to do work in the Yocto Project environment: | |||
| 118 | using ``devtool`` makes kernel development quicker by reducing | 116 | using ``devtool`` makes kernel development quicker by reducing |
| 119 | iteration cycle times. | 117 | iteration cycle times. |
| 120 | 118 | ||
| 121 | The `Yocto Project Linux Kernel Development | 119 | The :doc:`../kernel-dev/kernel-dev` provides kernel-related |
| 122 | Manual <&YOCTO_DOCS_KERNEL_DEV_URL;>`__ provides kernel-related | ||
| 123 | development information. For specifics on development host | 120 | development information. For specifics on development host |
| 124 | preparation, see the "`Preparing the Build Host to Work on the | 121 | preparation, see the |
| 125 | Kernel <&YOCTO_DOCS_KERNEL_DEV_URL;#preparing-the-build-host-to-work-on-the-kernel>`__" | 122 | ":ref:`kernel-dev/kernel-dev-common:preparing the build host to work on the kernel`" |
| 126 | section in the Yocto Project Linux Kernel Development Manual. | 123 | section in the Yocto Project Linux Kernel Development Manual. |
| 127 | 124 | ||
| 128 | - *Using Toaster:* The other Yocto Project development method that | 125 | - *Using Toaster:* The other Yocto Project development method that |
| @@ -134,8 +131,8 @@ methods exist for you to do work in the Yocto Project environment: | |||
| 134 | multiple remote build servers. | 131 | multiple remote build servers. |
| 135 | 132 | ||
| 136 | For steps that show you how to set up your development host to use | 133 | For steps that show you how to set up your development host to use |
| 137 | Toaster and on how to use Toaster in general, see the `Toaster User | 134 | Toaster and on how to use Toaster in general, see the |
| 138 | Manual <&YOCTO_DOCS_TOAST_URL;>`__. | 135 | :doc:`../toaster-manual/toaster-manual`. |
| 139 | 136 | ||
| 140 | .. _yocto-project-repositories: | 137 | .. _yocto-project-repositories: |
| 141 | 138 | ||
| @@ -185,8 +182,7 @@ development: | |||
| 185 | :align: center | 182 | :align: center |
| 186 | 183 | ||
| 187 | For steps on how to view and access these upstream Git repositories, | 184 | For steps on how to view and access these upstream Git repositories, |
| 188 | see the "`Accessing Source | 185 | see the ":ref:`dev-manual/dev-manual-start:accessing source repositories`" |
| 189 | Repositories <&YOCTO_DOCS_DEV_URL;#accessing-source-repositories>`__" | ||
| 190 | Section in the Yocto Project Development Tasks Manual. | 186 | Section in the Yocto Project Development Tasks Manual. |
| 191 | 187 | ||
| 192 | - :yocto_dl:`Index of /releases: <releases>` This is an index | 188 | - :yocto_dl:`Index of /releases: <releases>` This is an index |
| @@ -199,9 +195,8 @@ development: | |||
| 199 | .. image:: figures/index-downloads.png | 195 | .. image:: figures/index-downloads.png |
| 200 | :align: center | 196 | :align: center |
| 201 | 197 | ||
| 202 | For steps on how to view and access these files, see the "`Accessing | 198 | For steps on how to view and access these files, see the |
| 203 | Index of | 199 | ":ref:`dev-manual/dev-manual-start:accessing index of releases`" |
| 204 | Releases <&YOCTO_DOCS_DEV_URL;#accessing-index-of-releases>`__" | ||
| 205 | section in the Yocto Project Development Tasks Manual. | 200 | section in the Yocto Project Development Tasks Manual. |
| 206 | 201 | ||
| 207 | - *"DOWNLOADS" page for the* :yocto_home:`Yocto Project Website <>` *:* | 202 | - *"DOWNLOADS" page for the* :yocto_home:`Yocto Project Website <>` *:* |
| @@ -215,8 +210,8 @@ development: | |||
| 215 | .. image:: figures/yp-download.png | 210 | .. image:: figures/yp-download.png |
| 216 | :align: center | 211 | :align: center |
| 217 | 212 | ||
| 218 | For steps on how to use the "DOWNLOADS" page, see the "`Using the | 213 | For steps on how to use the "DOWNLOADS" page, see the |
| 219 | Downloads Page <&YOCTO_DOCS_DEV_URL;#using-the-downloads-page>`__" | 214 | ":ref:`dev-manual/dev-manual-start:using the downloads page`" |
| 220 | section in the Yocto Project Development Tasks Manual. | 215 | section in the Yocto Project Development Tasks Manual. |
| 221 | 216 | ||
| 222 | .. _gs-git-workflows-and-the-yocto-project: | 217 | .. _gs-git-workflows-and-the-yocto-project: |
| @@ -252,9 +247,9 @@ and so forth. | |||
| 252 | .. note:: | 247 | .. note:: |
| 253 | 248 | ||
| 254 | For information on finding out who is responsible for (maintains) a | 249 | For information on finding out who is responsible for (maintains) a |
| 255 | particular area of code in the Yocto Project, see the " | 250 | particular area of code in the Yocto Project, see the |
| 256 | Submitting a Change to the Yocto Project | 251 | ":ref:`dev-manual/dev-manual-common-tasks:submitting a change to the yocto project`" |
| 257 | " section of the Yocto Project Development Tasks Manual. | 252 | section of the Yocto Project Development Tasks Manual. |
| 258 | 253 | ||
| 259 | The Yocto Project ``poky`` Git repository also has an upstream | 254 | The Yocto Project ``poky`` Git repository also has an upstream |
| 260 | contribution Git repository named ``poky-contrib``. You can see all the | 255 | contribution Git repository named ``poky-contrib``. You can see all the |
| @@ -284,9 +279,9 @@ A somewhat formal method exists by which developers commit changes and | |||
| 284 | push them into the "contrib" area and subsequently request that the | 279 | push them into the "contrib" area and subsequently request that the |
| 285 | maintainer include them into an upstream branch. This process is called | 280 | maintainer include them into an upstream branch. This process is called |
| 286 | “submitting a patch” or "submitting a change." For information on | 281 | “submitting a patch” or "submitting a change." For information on |
| 287 | submitting patches and changes, see the "`Submitting a Change to the | 282 | submitting patches and changes, see the |
| 288 | Yocto Project <&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change>`__" section | 283 | ":ref:`dev-manual/dev-manual-common-tasks:submitting a change to the yocto project`" |
| 289 | in the Yocto Project Development Tasks Manual. | 284 | section in the Yocto Project Development Tasks Manual. |
| 290 | 285 | ||
| 291 | In summary, a single point of entry exists for changes into a "master" | 286 | In summary, a single point of entry exists for changes into a "master" |
| 292 | or development branch of the Git repository, which is controlled by the | 287 | or development branch of the Git repository, which is controlled by the |
| @@ -351,20 +346,18 @@ Book <http://book.git-scm.com>`__. | |||
| 351 | release to facilitate this workflow. You can find these scripts in | 346 | release to facilitate this workflow. You can find these scripts in |
| 352 | the ``scripts`` folder of the | 347 | the ``scripts`` folder of the |
| 353 | :term:`Source Directory`. For information | 348 | :term:`Source Directory`. For information |
| 354 | on how to use these scripts, see the "`Using Scripts to Push a Change | 349 | on how to use these scripts, see the |
| 355 | Upstream and Request a | 350 | ":ref:`dev-manual/dev-manual-common-tasks:using scripts to push a change upstream and request a pull`" |
| 356 | Pull <&YOCTO_DOCS_DEV_URL;#pushing-a-change-upstream>`__" section in | 351 | section in the Yocto Project Development Tasks Manual. |
| 357 | the Yocto Project Development Tasks Manual. | ||
| 358 | 352 | ||
| 359 | - *Patch Workflow:* This workflow allows you to notify the maintainer | 353 | - *Patch Workflow:* This workflow allows you to notify the maintainer |
| 360 | through an email that you have a change (or patch) you would like | 354 | through an email that you have a change (or patch) you would like |
| 361 | considered for the "master" branch of the Git repository. To send | 355 | considered for the "master" branch of the Git repository. To send |
| 362 | this type of change, you format the patch and then send the email | 356 | this type of change, you format the patch and then send the email |
| 363 | using the Git commands ``git format-patch`` and ``git send-email``. | 357 | using the Git commands ``git format-patch`` and ``git send-email``. |
| 364 | For information on how to use these scripts, see the "`Submitting a | 358 | For information on how to use these scripts, see the |
| 365 | Change to the Yocto | 359 | ":ref:`dev-manual/dev-manual-common-tasks:submitting a change to the yocto project`" |
| 366 | Project <&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change>`__" section in | 360 | section in the Yocto Project Development Tasks Manual. |
| 367 | the Yocto Project Development Tasks Manual. | ||
| 368 | 361 | ||
| 369 | Git | 362 | Git |
| 370 | === | 363 | === |
| @@ -389,8 +382,7 @@ commands. | |||
| 389 | page, see http://git-scm.com/download. | 382 | page, see http://git-scm.com/download. |
| 390 | 383 | ||
| 391 | - For information beyond the introductory nature in this section, | 384 | - For information beyond the introductory nature in this section, |
| 392 | see the "`Locating Yocto Project Source | 385 | see the ":ref:`dev-manual/dev-manual-start:locating yocto project source files`" |
| 393 | Files <&YOCTO_DOCS_DEV_URL;#locating-yocto-project-source-files>`__" | ||
| 394 | section in the Yocto Project Development Tasks Manual. | 386 | section in the Yocto Project Development Tasks Manual. |
| 395 | 387 | ||
| 396 | Repositories, Tags, and Branches | 388 | Repositories, Tags, and Branches |
| @@ -422,14 +414,13 @@ You can create a local copy of any repository by "cloning" it with the | |||
| 422 | an identical copy of the repository on your development system. Once you | 414 | an identical copy of the repository on your development system. Once you |
| 423 | have a local copy of a repository, you can take steps to develop | 415 | have a local copy of a repository, you can take steps to develop |
| 424 | locally. For examples on how to clone Git repositories, see the | 416 | locally. For examples on how to clone Git repositories, see the |
| 425 | "`Locating Yocto Project Source | 417 | ":ref:`dev-manual/dev-manual-start:locating yocto project source files`" |
| 426 | Files <&YOCTO_DOCS_DEV_URL;#locating-yocto-project-source-files>`__" | ||
| 427 | section in the Yocto Project Development Tasks Manual. | 418 | section in the Yocto Project Development Tasks Manual. |
| 428 | 419 | ||
| 429 | It is important to understand that Git tracks content change and not | 420 | It is important to understand that Git tracks content change and not |
| 430 | files. Git uses "branches" to organize different development efforts. | 421 | files. Git uses "branches" to organize different development efforts. |
| 431 | For example, the ``poky`` repository has several branches that include | 422 | For example, the ``poky`` repository has several branches that include |
| 432 | the current "DISTRO_NAME_NO_CAP" branch, the "master" branch, and many | 423 | the current "&DISTRO_NAME_NO_CAP;" branch, the "master" branch, and many |
| 433 | branches for past Yocto Project releases. You can see all the branches | 424 | branches for past Yocto Project releases. You can see all the branches |
| 434 | by going to https://git.yoctoproject.org/cgit.cgi/poky/ and clicking on the | 425 | by going to https://git.yoctoproject.org/cgit.cgi/poky/ and clicking on the |
| 435 | ``[...]`` link beneath the "Branch" heading. | 426 | ``[...]`` link beneath the "Branch" heading. |
| @@ -444,17 +435,23 @@ local working area (also called a branch) that tracks a specific | |||
| 444 | development branch from the upstream source Git repository. in other | 435 | development branch from the upstream source Git repository. in other |
| 445 | words, you can define your local Git environment to work on any | 436 | words, you can define your local Git environment to work on any |
| 446 | development branch in the repository. To help illustrate, consider the | 437 | development branch in the repository. To help illustrate, consider the |
| 447 | following example Git commands: $ cd ~ $ git clone | 438 | following example Git commands: |
| 448 | git://git.yoctoproject.org/poky $ cd poky $ git checkout -b | 439 | :: |
| 449 | DISTRO_NAME_NO_CAP origin/DISTRO_NAME_NO_CAP In the previous example | 440 | |
| 441 | $ cd ~ | ||
| 442 | $ git clone git://git.yoctoproject.org/poky | ||
| 443 | $ cd poky | ||
| 444 | $ git checkout -b &DISTRO_NAME_NO_CAP; origin/&DISTRO_NAME_NO_CAP; | ||
| 445 | |||
| 446 | In the previous example | ||
| 450 | after moving to the home directory, the ``git clone`` command creates a | 447 | after moving to the home directory, the ``git clone`` command creates a |
| 451 | local copy of the upstream ``poky`` Git repository. By default, Git | 448 | local copy of the upstream ``poky`` Git repository. By default, Git |
| 452 | checks out the "master" branch for your work. After changing the working | 449 | checks out the "master" branch for your work. After changing the working |
| 453 | directory to the new local repository (i.e. ``poky``), the | 450 | directory to the new local repository (i.e. ``poky``), the |
| 454 | ``git checkout`` command creates and checks out a local branch named | 451 | ``git checkout`` command creates and checks out a local branch named |
| 455 | "DISTRO_NAME_NO_CAP", which tracks the upstream | 452 | "&DISTRO_NAME_NO_CAP;", which tracks the upstream |
| 456 | "origin/DISTRO_NAME_NO_CAP" branch. Changes you make while in this | 453 | "origin/&DISTRO_NAME_NO_CAP;" branch. Changes you make while in this |
| 457 | branch would ultimately affect the upstream "DISTRO_NAME_NO_CAP" branch | 454 | branch would ultimately affect the upstream "&DISTRO_NAME_NO_CAP;" branch |
| 458 | of the ``poky`` repository. | 455 | of the ``poky`` repository. |
| 459 | 456 | ||
| 460 | It is important to understand that when you create and checkout a local | 457 | It is important to understand that when you create and checkout a local |
| @@ -462,7 +459,7 @@ working branch based on a branch name, your local environment matches | |||
| 462 | the "tip" of that particular development branch at the time you created | 459 | the "tip" of that particular development branch at the time you created |
| 463 | your local branch, which could be different from the files in the | 460 | your local branch, which could be different from the files in the |
| 464 | "master" branch of the upstream repository. In other words, creating and | 461 | "master" branch of the upstream repository. In other words, creating and |
| 465 | checking out a local branch based on the "DISTRO_NAME_NO_CAP" branch | 462 | checking out a local branch based on the "&DISTRO_NAME_NO_CAP;" branch |
| 466 | name is not the same as checking out the "master" branch in the | 463 | name is not the same as checking out the "master" branch in the |
| 467 | repository. Keep reading to see how you create a local snapshot of a | 464 | repository. Keep reading to see how you create a local snapshot of a |
| 468 | Yocto Project Release. | 465 | Yocto Project Release. |
| @@ -476,7 +473,7 @@ beneath the "Tag" heading. | |||
| 476 | 473 | ||
| 477 | Some key tags for the ``poky`` repository are ``jethro-14.0.3``, | 474 | Some key tags for the ``poky`` repository are ``jethro-14.0.3``, |
| 478 | ``morty-16.0.1``, ``pyro-17.0.0``, and | 475 | ``morty-16.0.1``, ``pyro-17.0.0``, and |
| 479 | ``DISTRO_NAME_NO_CAP-POKYVERSION``. These tags represent Yocto Project | 476 | ``&DISTRO_NAME_NO_CAP;-&POKYVERSION;``. These tags represent Yocto Project |
| 480 | releases. | 477 | releases. |
| 481 | 478 | ||
| 482 | When you create a local copy of the Git repository, you also have access | 479 | When you create a local copy of the Git repository, you also have access |
| @@ -485,9 +482,16 @@ create and checkout a local working Git branch based on a tag name. When | |||
| 485 | you do this, you get a snapshot of the Git repository that reflects the | 482 | you do this, you get a snapshot of the Git repository that reflects the |
| 486 | state of the files when the change was made associated with that tag. | 483 | state of the files when the change was made associated with that tag. |
| 487 | The most common use is to checkout a working branch that matches a | 484 | The most common use is to checkout a working branch that matches a |
| 488 | specific Yocto Project release. Here is an example: $ cd ~ $ git clone | 485 | specific Yocto Project release. Here is an example: |
| 489 | git://git.yoctoproject.org/poky $ cd poky $ git fetch --tags $ git | 486 | :: |
| 490 | checkout tags/rocko-18.0.0 -b my_rocko-18.0.0 In this example, the name | 487 | |
| 488 | $ cd ~ | ||
| 489 | $ git clone git://git.yoctoproject.org/poky | ||
| 490 | $ cd poky | ||
| 491 | $ git fetch --tags | ||
| 492 | $ git checkout tags/rocko-18.0.0 -b my_rocko-18.0.0 | ||
| 493 | |||
| 494 | In this example, the name | ||
| 491 | of the top-level directory of your local Yocto Project repository is | 495 | of the top-level directory of your local Yocto Project repository is |
| 492 | ``poky``. After moving to the ``poky`` directory, the ``git fetch`` | 496 | ``poky``. After moving to the ``poky`` directory, the ``git fetch`` |
| 493 | command makes all the upstream tags available locally in your | 497 | command makes all the upstream tags available locally in your |
| @@ -518,62 +522,62 @@ list (in most cases) simply shows the base command and omits the many | |||
| 518 | arguments it supports. See the Git documentation for complete | 522 | arguments it supports. See the Git documentation for complete |
| 519 | descriptions and strategies on how to use these commands: | 523 | descriptions and strategies on how to use these commands: |
| 520 | 524 | ||
| 521 | - *``git init``:* Initializes an empty Git repository. You cannot use | 525 | - *git init:* Initializes an empty Git repository. You cannot use |
| 522 | Git commands unless you have a ``.git`` repository. | 526 | Git commands unless you have a ``.git`` repository. |
| 523 | 527 | ||
| 524 | - *``git clone``:* Creates a local clone of a Git repository that is on | 528 | - *git clone:* Creates a local clone of a Git repository that is on |
| 525 | equal footing with a fellow developer’s Git repository or an upstream | 529 | equal footing with a fellow developer’s Git repository or an upstream |
| 526 | repository. | 530 | repository. |
| 527 | 531 | ||
| 528 | - *``git add``:* Locally stages updated file contents to the index that | 532 | - *git add:* Locally stages updated file contents to the index that |
| 529 | Git uses to track changes. You must stage all files that have changed | 533 | Git uses to track changes. You must stage all files that have changed |
| 530 | before you can commit them. | 534 | before you can commit them. |
| 531 | 535 | ||
| 532 | - *``git commit``:* Creates a local "commit" that documents the changes | 536 | - *git commit:* Creates a local "commit" that documents the changes |
| 533 | you made. Only changes that have been staged can be committed. | 537 | you made. Only changes that have been staged can be committed. |
| 534 | Commits are used for historical purposes, for determining if a | 538 | Commits are used for historical purposes, for determining if a |
| 535 | maintainer of a project will allow the change, and for ultimately | 539 | maintainer of a project will allow the change, and for ultimately |
| 536 | pushing the change from your local Git repository into the project’s | 540 | pushing the change from your local Git repository into the project’s |
| 537 | upstream repository. | 541 | upstream repository. |
| 538 | 542 | ||
| 539 | - *``git status``:* Reports any modified files that possibly need to be | 543 | - *git status:* Reports any modified files that possibly need to be |
| 540 | staged and gives you a status of where you stand regarding local | 544 | staged and gives you a status of where you stand regarding local |
| 541 | commits as compared to the upstream repository. | 545 | commits as compared to the upstream repository. |
| 542 | 546 | ||
| 543 | - *``git checkout`` branch-name:* Changes your local working branch and | 547 | - *git checkout branch-name:* Changes your local working branch and |
| 544 | in this form assumes the local branch already exists. This command is | 548 | in this form assumes the local branch already exists. This command is |
| 545 | analogous to "cd". | 549 | analogous to "cd". |
| 546 | 550 | ||
| 547 | - *``git checkout –b`` working-branch upstream-branch:* Creates and | 551 | - *git checkout –b working-branch upstream-branch:* Creates and |
| 548 | checks out a working branch on your local machine. The local branch | 552 | checks out a working branch on your local machine. The local branch |
| 549 | tracks the upstream branch. You can use your local branch to isolate | 553 | tracks the upstream branch. You can use your local branch to isolate |
| 550 | your work. It is a good idea to use local branches when adding | 554 | your work. It is a good idea to use local branches when adding |
| 551 | specific features or changes. Using isolated branches facilitates | 555 | specific features or changes. Using isolated branches facilitates |
| 552 | easy removal of changes if they do not work out. | 556 | easy removal of changes if they do not work out. |
| 553 | 557 | ||
| 554 | - *``git branch``:* Displays the existing local branches associated | 558 | - *git branch:* Displays the existing local branches associated |
| 555 | with your local repository. The branch that you have currently | 559 | with your local repository. The branch that you have currently |
| 556 | checked out is noted with an asterisk character. | 560 | checked out is noted with an asterisk character. |
| 557 | 561 | ||
| 558 | - *``git branch -D`` branch-name:* Deletes an existing local branch. | 562 | - *git branch -D branch-name:* Deletes an existing local branch. |
| 559 | You need to be in a local branch other than the one you are deleting | 563 | You need to be in a local branch other than the one you are deleting |
| 560 | in order to delete branch-name. | 564 | in order to delete branch-name. |
| 561 | 565 | ||
| 562 | - *``git pull --rebase``:* Retrieves information from an upstream Git | 566 | - *git pull --rebase:* Retrieves information from an upstream Git |
| 563 | repository and places it in your local Git repository. You use this | 567 | repository and places it in your local Git repository. You use this |
| 564 | command to make sure you are synchronized with the repository from | 568 | command to make sure you are synchronized with the repository from |
| 565 | which you are basing changes (.e.g. the "master" branch). The | 569 | which you are basing changes (.e.g. the "master" branch). The |
| 566 | "--rebase" option ensures that any local commits you have in your | 570 | "--rebase" option ensures that any local commits you have in your |
| 567 | branch are preserved at the top of your local branch. | 571 | branch are preserved at the top of your local branch. |
| 568 | 572 | ||
| 569 | - *``git push`` repo-name local-branch\ ``:``\ upstream-branch:* Sends | 573 | - *git push repo-name local-branch:upstream-branch:* Sends |
| 570 | all your committed local changes to the upstream Git repository that | 574 | all your committed local changes to the upstream Git repository that |
| 571 | your local repository is tracking (e.g. a contribution repository). | 575 | your local repository is tracking (e.g. a contribution repository). |
| 572 | The maintainer of the project draws from these repositories to merge | 576 | The maintainer of the project draws from these repositories to merge |
| 573 | changes (commits) into the appropriate branch of project's upstream | 577 | changes (commits) into the appropriate branch of project's upstream |
| 574 | repository. | 578 | repository. |
| 575 | 579 | ||
| 576 | - *``git merge``:* Combines or adds changes from one local branch of | 580 | - *git merge:* Combines or adds changes from one local branch of |
| 577 | your repository with another branch. When you create a local Git | 581 | your repository with another branch. When you create a local Git |
| 578 | repository, the default branch is named "master". A typical workflow | 582 | repository, the default branch is named "master". A typical workflow |
| 579 | is to create a temporary branch that is based off "master" that you | 583 | is to create a temporary branch that is based off "master" that you |
| @@ -585,12 +589,12 @@ descriptions and strategies on how to use these commands: | |||
| 585 | done with working in that isolated branch, you can safely delete the | 589 | done with working in that isolated branch, you can safely delete the |
| 586 | isolated branch. | 590 | isolated branch. |
| 587 | 591 | ||
| 588 | - *``git cherry-pick`` commits:* Choose and apply specific commits from | 592 | - *git cherry-pick commits:* Choose and apply specific commits from |
| 589 | one branch into another branch. There are times when you might not be | 593 | one branch into another branch. There are times when you might not be |
| 590 | able to merge all the changes in one branch with another but need to | 594 | able to merge all the changes in one branch with another but need to |
| 591 | pick out certain ones. | 595 | pick out certain ones. |
| 592 | 596 | ||
| 593 | - *``gitk``:* Provides a GUI view of the branches and changes in your | 597 | - *gitk:* Provides a GUI view of the branches and changes in your |
| 594 | local Git repository. This command is a good way to graphically see | 598 | local Git repository. This command is a good way to graphically see |
| 595 | where things have diverged in your local repository. | 599 | where things have diverged in your local repository. |
| 596 | 600 | ||
| @@ -600,11 +604,11 @@ descriptions and strategies on how to use these commands: | |||
| 600 | gitk | 604 | gitk |
| 601 | package on your development system to use this command. | 605 | package on your development system to use this command. |
| 602 | 606 | ||
| 603 | - *``git log``:* Reports a history of your commits to the repository. | 607 | - *git log:* Reports a history of your commits to the repository. |
| 604 | This report lists all commits regardless of whether you have pushed | 608 | This report lists all commits regardless of whether you have pushed |
| 605 | them upstream or not. | 609 | them upstream or not. |
| 606 | 610 | ||
| 607 | - *``git diff``:* Displays line-by-line differences between a local | 611 | - *git diff:* Displays line-by-line differences between a local |
| 608 | working file and the same file as understood by Git. This command is | 612 | working file and the same file as understood by Git. This command is |
| 609 | useful to see what you have changed in any given file. | 613 | useful to see what you have changed in any given file. |
| 610 | 614 | ||
| @@ -663,7 +667,6 @@ Project uses in the ``meta/files/common-licenses`` directory in your | |||
| 663 | 667 | ||
| 664 | For information that can help you maintain compliance with various open | 668 | For information that can help you maintain compliance with various open |
| 665 | source licensing during the lifecycle of a product created using the | 669 | source licensing during the lifecycle of a product created using the |
| 666 | Yocto Project, see the "`Maintaining Open Source License Compliance | 670 | Yocto Project, see the |
| 667 | During Your Product's | 671 | ":ref:`dev-manual/dev-manual-common-tasks:maintaining open source license compliance during your product's lifecycle`" |
| 668 | Lifecycle <&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle>`__" | ||
| 669 | section in the Yocto Project Development Tasks Manual. | 672 | section in the Yocto Project Development Tasks Manual. |
