From 563166e0e2071a7c0e89e923cef0760fcd7acdce Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Mon, 2 Dec 2024 14:09:32 -1000 Subject: [PATCH] include download /1 --- aspnetcore/includes/git_download.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 aspnetcore/includes/git_download.md diff --git a/aspnetcore/includes/git_download.md b/aspnetcore/includes/git_download.md new file mode 100644 index 0000000000..1f852ca587 --- /dev/null +++ b/aspnetcore/includes/git_download.md @@ -0,0 +1,11 @@ +> [!TIP] +> Use [`git sparse-checkout`](https://git-scm.com/docs/git-sparse-checkout) to only download the sample subfolder and the last commit. For example: +``` +git clone --depth 1 --filter=blob:none https://github.com/dotnet/AspNetCore.Docs.git --sparse +cd AspNetCore.Docs +git sparse-checkout init --cone +git sparse-checkout set aspnetcore/security/authorization/secure-data/samples +``` + +In the preceding example, the `git sparse-checkout set` command specifies the path to the subfolder that you want to download. Replace +`aspnetcore/security/authorization/secure-data/samples` with the path to the subfolder that you want to download. \ No newline at end of file