diff --git a/documentation/content/en/books/handbook/ports/_index.adoc b/documentation/content/en/books/handbook/ports/_index.adoc --- a/documentation/content/en/books/handbook/ports/_index.adoc +++ b/documentation/content/en/books/handbook/ports/_index.adoc @@ -712,6 +712,9 @@ Git can be used to obtain the Ports Collection. Refer to extref:{committers-guide}[the Git Primer, git-primer] for a detailed description of Git. +We add --depth 1 to the git command line to clone the tree without obtaining the commit history, which saves time and is acceptable for most users. +If you have your own changes to the ports tree, or need the history for any reason, omit the --depth 1 argument below. + . Git must be installed before it can be used to check out the ports tree. If a copy of the ports tree is already present, install Git like this: + [source,shell] @@ -731,14 +734,14 @@ + [source,shell] .... -# git clone https://git.FreeBSD.org/ports.git /usr/ports +# git clone --depth 1 https://git.FreeBSD.org/ports.git /usr/ports .... + . Or, check out a copy of a quarterly branch: + [source,shell] .... -# git clone https://git.FreeBSD.org/ports.git -b 2023Q1 /usr/ports +# git clone --depth 1 https://git.FreeBSD.org/ports.git -b 2023Q1 /usr/ports .... + . As needed, update `/usr/ports` after the initial Git checkout: