aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Zhmylev <zhmylove@narod.ru>2025-01-19 14:10:40 +0000
committerWarner Losh <imp@FreeBSD.org>2025-08-31 18:54:28 +0000
commit50735390bd3ed510a067085d617ba0e0d050b029 (patch)
tree0ecd81c17527009ef1b193e49badf08e99ae8283
parent12fd818f81f24cc8a01b5120aa03c4107722ee77 (diff)
handbook: Add git switch info for shallow clones
Signed-off-by: Sergei Zhmylev <zhmylove@narod.ru> Reviewed-by: Warner Losh <imp@FreeBSD.org>
-rw-r--r--documentation/content/en/books/handbook/ports/_index.adoc7
1 files changed, 4 insertions, 3 deletions
diff --git a/documentation/content/en/books/handbook/ports/_index.adoc b/documentation/content/en/books/handbook/ports/_index.adoc
index 725e00331c..a6e68a7137 100644
--- a/documentation/content/en/books/handbook/ports/_index.adoc
+++ b/documentation/content/en/books/handbook/ports/_index.adoc
@@ -730,8 +730,8 @@ If more control over the ports tree is needed or if local changes need to be mai
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.
-When maintaining custom changes to the ports tree, or need the history for any reason, omit the --depth 1 argument below.
+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.
+When maintaining custom 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:
+
@@ -773,7 +773,8 @@ If the ports tree is not available, or pkg is being used to manage packages, Git
+
[source,shell]
....
-# git -C /usr/ports switch 2023Q1
+# git -C /usr/ports fetch --depth 1 origin 2023Q2:2023Q2
+# git -C /usr/ports switch 2023Q2
....
****