From d26f0c99076e8b1d9f3e94f2606ffc743cfc3f75 Mon Sep 17 00:00:00 2001 From: Antoine Mazure <12ab@gmx.fr> Date: Tue, 3 Nov 2020 12:48:52 +0100 Subject: [PATCH] git-clone: add clone single branch example (#4924) --- pages/common/git-clone.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pages/common/git-clone.md b/pages/common/git-clone.md index 19f92e9003..a3dad19151 100644 --- a/pages/common/git-clone.md +++ b/pages/common/git-clone.md @@ -7,6 +7,10 @@ `git clone {{remote_repository_location}}` +- Clone an existing repository into a specific directory: + +`git clone {{remote_repository_location}} {{path/to/directory}}` + - Clone an existing repository and its submodules: `git clone --recursive {{remote_repository_location}}` @@ -22,3 +26,7 @@ - Clone an existing repository only fetching the 10 most recent commits on the default branch (useful to save time): `git clone --depth {{10}} {{remote_repository_location}}` + +- Clone an existing repository only fetching a specific branch: + +`git clone --branch {{name}} --single-branch {{remote_repository_location}}`