1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Use shallow git clone for production installations

This commit is contained in:
jeremystretch
2021-09-07 16:35:48 -04:00
parent 4d9691c8e5
commit 46cd55151d

View File

@ -70,19 +70,22 @@ If `git` is not already installed, install it:
Next, clone the **master** branch of the NetBox GitHub repository into the current directory. (This branch always holds the current stable release.) Next, clone the **master** branch of the NetBox GitHub repository into the current directory. (This branch always holds the current stable release.)
```no-highlight ```no-highlight
sudo git clone -b master https://github.com/netbox-community/netbox.git . sudo git clone -b master --depth 1 https://github.com/netbox-community/netbox.git .
``` ```
!!! note
The `git clone` command above utilizes a "shallow clone" to retrieve only the most recent commit. If you need to download the entire history, omit the `--depth 1` argument.
The `git clone` command should generate output similar to the following: The `git clone` command should generate output similar to the following:
``` ```
Cloning into '.'... Cloning into '.'...
remote: Counting objects: 1994, done. remote: Enumerating objects: 996, done.
remote: Compressing objects: 100% (150/150), done. remote: Counting objects: 100% (996/996), done.
remote: Total 1994 (delta 80), reused 0 (delta 0), pack-reused 1842 remote: Compressing objects: 100% (935/935), done.
Receiving objects: 100% (1994/1994), 472.36 KiB | 0 bytes/s, done. remote: Total 996 (delta 148), reused 386 (delta 34), pack-reused 0
Resolving deltas: 100% (1495/1495), done. Receiving objects: 100% (996/996), 4.26 MiB | 9.81 MiB/s, done.
Checking connectivity... done. Resolving deltas: 100% (148/148), done.
``` ```
!!! note !!! note