summaryrefslogtreecommitdiffstats
path: root/documentation/getting-started
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2018-02-22 13:42:34 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-03 08:35:25 +0000
commit52331ef4d00e122547d95240384ad2b612d0b609 (patch)
tree3d1d8ecb57da9a01b28819cc1233db752f668cde /documentation/getting-started
parent30ad0a889646508b568e07810e207e92a80beb6d (diff)
downloadpoky-52331ef4d00e122547d95240384ad2b612d0b609.tar.gz
getting-started: Edits to the Git section.
(From yocto-docs rev: d1512e2f9e17be58dcd8c64ce7911d6ee1ebc12c) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/getting-started')
-rw-r--r--documentation/getting-started/getting-started-development-environment.xml44
1 files changed, 26 insertions, 18 deletions
diff --git a/documentation/getting-started/getting-started-development-environment.xml b/documentation/getting-started/getting-started-development-environment.xml
index 0c08859ea0..23021e1844 100644
--- a/documentation/getting-started/getting-started-development-environment.xml
+++ b/documentation/getting-started/getting-started-development-environment.xml
@@ -539,8 +539,8 @@
539 <ulink url='http://git-scm.com/download'></ulink>. 539 <ulink url='http://git-scm.com/download'></ulink>.
540 </para></listitem> 540 </para></listitem>
541 <listitem><para> 541 <listitem><para>
542 For examples beyond the limited few in this section on how 542 For information beyond the introductory nature in this
543 to use Git with the Yocto Project, see the 543 section, see the
544 "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-yocto-project-source-files'>Working With Yocto Project Source Files</ulink>" 544 "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-yocto-project-source-files'>Working With Yocto Project Source Files</ulink>"
545 section in the Yocto Project Development Tasks Manual. 545 section in the Yocto Project Development Tasks Manual.
546 </para></listitem> 546 </para></listitem>
@@ -575,8 +575,8 @@
575 A Git repository represents all development efforts for a given 575 A Git repository represents all development efforts for a given
576 project. 576 project.
577 For example, the Git repository <filename>poky</filename> contains 577 For example, the Git repository <filename>poky</filename> contains
578 all changes and developments for Poky over the course of its 578 all changes and developments for that repository over the course
579 entire life. 579 of its entire life.
580 That means that all changes that make up all releases are captured. 580 That means that all changes that make up all releases are captured.
581 The repository maintains a complete history of changes. 581 The repository maintains a complete history of changes.
582 </para> 582 </para>
@@ -653,15 +653,16 @@
653 of the upstream repository. 653 of the upstream repository.
654 In other words, creating and checking out a local branch based on 654 In other words, creating and checking out a local branch based on
655 the "&DISTRO_NAME_NO_CAP;" branch name is not the same as 655 the "&DISTRO_NAME_NO_CAP;" branch name is not the same as
656 cloning and checking out the "master" branch if the repository. 656 checking out the "master" branch in the repository.
657 Keep reading to see how you create a local snapshot of a Yocto 657 Keep reading to see how you create a local snapshot of a Yocto
658 Project Release. 658 Project Release.
659 </para> 659 </para>
660 660
661 <para> 661 <para>
662 Git uses "tags" to mark specific changes in a repository. 662 Git uses "tags" to mark specific changes in a repository branch
663 structure.
663 Typically, a tag is used to mark a special point such as the final 664 Typically, a tag is used to mark a special point such as the final
664 change before a project is released. 665 change (or commit) before a project is released.
665 You can see the tags used with the <filename>poky</filename> Git 666 You can see the tags used with the <filename>poky</filename> Git
666 repository by going to 667 repository by going to
667 <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and 668 <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and
@@ -671,7 +672,7 @@
671 </para> 672 </para>
672 673
673 <para> 674 <para>
674 Some key tags for the <filename>poky</filename> are 675 Some key tags for the <filename>poky</filename> repository are
675 <filename>jethro-14.0.3</filename>, 676 <filename>jethro-14.0.3</filename>,
676 <filename>morty-16.0.1</filename>, 677 <filename>morty-16.0.1</filename>,
677 <filename>pyro-17.0.0</filename>, and 678 <filename>pyro-17.0.0</filename>, and
@@ -704,15 +705,15 @@
704 tags available locally in your repository. 705 tags available locally in your repository.
705 Finally, the <filename>git checkout</filename> command 706 Finally, the <filename>git checkout</filename> command
706 creates and checks out a branch named "my-pyro-17.0.0" that is 707 creates and checks out a branch named "my-pyro-17.0.0" that is
707 based on the specific change upstream in the repository 708 based on the upstream branch whose "HEAD" matches the
708 associated with the "pyro-17.0.0" tag. 709 commit in the repository associated with the "pyro-17.0.0" tag.
709 The files in your repository now exactly match that particular 710 The files in your repository now exactly match that particular
710 Yocto Project release as it is tagged in the upstream Git 711 Yocto Project release as it is tagged in the upstream Git
711 repository. 712 repository.
712 It is important to understand that when you create and 713 It is important to understand that when you create and
713 checkout a local working branch based on a tag, your environment 714 checkout a local working branch based on a tag, your environment
714 matches a specific point in time and not the entire development 715 matches a specific point in time and not the entire development
715 branch (i.e. the "tip" of the branch). 716 branch (i.e. from the "tip" of the branch backwards).
716 </para> 717 </para>
717 </section> 718 </section>
718 719
@@ -740,7 +741,7 @@
740 The following list of Git commands briefly describes some basic 741 The following list of Git commands briefly describes some basic
741 Git operations as a way to get started. 742 Git operations as a way to get started.
742 As with any set of commands, this list (in most cases) simply shows 743 As with any set of commands, this list (in most cases) simply shows
743 the base command and omits the many arguments they support. 744 the base command and omits the many arguments it supports.
744 See the Git documentation for complete descriptions and strategies 745 See the Git documentation for complete descriptions and strategies
745 on how to use these commands: 746 on how to use these commands:
746 <itemizedlist> 747 <itemizedlist>
@@ -781,12 +782,16 @@
781 </para></listitem> 782 </para></listitem>
782 <listitem><para> 783 <listitem><para>
783 <emphasis><filename>git checkout</filename> <replaceable>branch-name</replaceable>:</emphasis> 784 <emphasis><filename>git checkout</filename> <replaceable>branch-name</replaceable>:</emphasis>
784 Changes your working branch. 785 Changes your local working branch and in this form
786 assumes the local branch already exists.
785 This command is analogous to "cd". 787 This command is analogous to "cd".
786 </para></listitem> 788 </para></listitem>
787 <listitem><para><emphasis><filename>git checkout –b</filename> <replaceable>working-branch</replaceable>:</emphasis> 789 <listitem><para>
790 <emphasis><filename>git checkout –b</filename> <replaceable>working-branch</replaceable> <replaceable>upstream-branch</replaceable>:</emphasis>
788 Creates and checks out a working branch on your local 791 Creates and checks out a working branch on your local
789 machine that you can use to isolate your work. 792 machine.
793 The local branch tracks the upstream branch.
794 You can use your local branch to isolate your work.
790 It is a good idea to use local branches when adding 795 It is a good idea to use local branches when adding
791 specific features or changes. 796 specific features or changes.
792 Using isolated branches facilitates easy removal of 797 Using isolated branches facilitates easy removal of
@@ -806,15 +811,18 @@
806 <replaceable>branch-name</replaceable>. 811 <replaceable>branch-name</replaceable>.
807 </para></listitem> 812 </para></listitem>
808 <listitem><para> 813 <listitem><para>
809 <emphasis><filename>git pull</filename>:</emphasis> 814 <emphasis><filename>git pull --rebase</filename>:</emphasis>
810 Retrieves information from an upstream Git repository 815 Retrieves information from an upstream Git repository
811 and places it in your local Git repository. 816 and places it in your local Git repository.
812 You use this command to make sure you are synchronized with 817 You use this command to make sure you are synchronized with
813 the repository from which you are basing changes 818 the repository from which you are basing changes
814 (.e.g. the "master" branch). 819 (.e.g. the "master" branch).
820 The "--rebase" option ensures that any local commits you
821 have in your branch are preserved at the top of your
822 local branch.
815 </para></listitem> 823 </para></listitem>
816 <listitem><para> 824 <listitem><para>
817 <emphasis><filename>git push</filename>:</emphasis> 825 <emphasis><filename>git push</filename> <replaceable>repo-name</replaceable> <replaceable>local-branch</replaceable><filename>:</filename><replaceable>upstream-branch</replaceable>:</emphasis>
818 Sends all your committed local changes to the upstream Git 826 Sends all your committed local changes to the upstream Git
819 repository that your local repository is tracking 827 repository that your local repository is tracking
820 (e.g. a contribution repository). 828 (e.g. a contribution repository).
@@ -840,7 +848,7 @@
840 the isolated branch. 848 the isolated branch.
841 </para></listitem> 849 </para></listitem>
842 <listitem><para> 850 <listitem><para>
843 <emphasis><filename>git cherry-pick</filename>:</emphasis> 851 <emphasis><filename>git cherry-pick</filename> <replaceable>commits</replaceable>:</emphasis>
844 Choose and apply specific commits from one branch 852 Choose and apply specific commits from one branch
845 into another branch. 853 into another branch.
846 There are times when you might not be able to merge 854 There are times when you might not be able to merge