From 1108cdc031d7edde4394097ec3700da285864ce1 Mon Sep 17 00:00:00 2001 From: Maarten ten Velden Date: Sun, 18 Jan 2026 22:45:08 +0100 Subject: [PATCH] Changed checkout instructions to use sparse-checkout instead of normal checkout Referred to Git documentation page on sparse-checkout as not only --cone used to not be default, but init was also not deprecated --- hub/package-manager/package/repository.md | 43 +++++++++++++++++++---- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/hub/package-manager/package/repository.md b/hub/package-manager/package/repository.md index 2961a691cb..7c1c6e037d 100644 --- a/hub/package-manager/package/repository.md +++ b/hub/package-manager/package/repository.md @@ -59,18 +59,16 @@ To create a fork of the Windows Package Manager Community repository and clone t 2. From Windows Command Prompt or PowerShell, use the following command to clone your fork. ```powershell - git clone + git clone --no-checkout ``` -3. If you are entering multiple submissions, create a branch instead of a fork. We currently allow only one manifest file per submission. +### Step 4: Setup sparse checkout - ```powershell - git checkout -b - ``` - -### Step 4: Add your manifest to the local repository +Sparse checkout allows you to choose which parts of a repository you want to download, instead of downloading everything. +Next you have to specify filters for sparse checkout to use (stored in `.git/info/sparse-checkout`). You must add your manifest files to the repository in the following folder structure: +To initialize sparse checkout for a repository you must type: **manifests** / **letter** / **publisher** / **application** / **version** @@ -82,6 +80,37 @@ You must add your manifest files to the repository in the following folder struc The `PackageIdentifier` and the `PackageVersion` values in the manifest must match the publisher, application names and version in the manifest folder path. For more information, see [Create your package manifest](manifest.md#tips-and-best-practices). +Thus to set up sparse checkout for all manifests of a publisher, you'd type: + +1. If you are using Git version 2.37.0 or newer, run the following command to set up spare checkout for your folder. + + ```powershell + git sparse-checkout set manifests\\ + ``` + + If you are using an older version of Git, refer to the [Git documentation](https://git-scm.com/docs/git-sparse-checkout) for how to set up sparse checkout for your local repository. + +Note that the above command will override all current sparse checkout settings and set it up for only that one folder, refer to the [Git documentation](https://git-scm.com/docs/git-sparse-checkout) for setting up sparce checkout with multiple folders. + +### Step 5: Checkout the repository + +You can now apply the sparse checkout settings by running. + +```powershell +git checkout +``` + +If you are entering multiple submissions, create a branch instead of a fork. We currently allow only one manifest file per submission. + +```powershell +git checkout -b +``` + +### Step 5: Add your manifest to the local repository + +Add your files into the folder explained in step 3. +**manifests** / **letter** / **publisher** / **application** / **version** + ### Step 5: Submit your manifest to the remote repository You're now ready to push your new manifest to the remote repository.