Skip to content

Commit dbbfec6

Browse files
Merge pull request #6550 from MicrosoftDocs/main639101317212062316sync_temp
For protected branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents 0a676c0 + a547388 commit dbbfec6

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

hub/package-manager/package/repository.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,17 @@ To create a fork of the Windows Package Manager Community repository and clone t
5959
2. From Windows Command Prompt or PowerShell, use the following command to clone your fork.
6060

6161
```powershell
62-
git clone --no-checkout <your-fork-name>
62+
git clone --filter=blob:none --no-checkout <your-fork-name>
6363
```
6464
6565
### Step 4: Setup sparse checkout
6666
6767
Sparse checkout allows you to choose which parts of a repository you want to download, instead of downloading everything.
68-
Next you have to specify filters for sparse checkout to use (stored in `.git/info/sparse-checkout`).
68+
In the previous step, `--filter=blob:none` means that the commit history has not been downloaded yet, and `--no-checkout` means that no files have been added to the working copy (the index) yet.
6969
70-
You must add your manifest files to the repository in the following folder structure:
71-
To initialize sparse checkout for a repository you must type:
70+
Before downloading anything, you'll have to specify filters for sparse checkout to use (stored in `.git/info/sparse-checkout`).
71+
72+
First, here is an explanation of what is going to be set up. You must add your manifest files to the repository in the following folder structure:
7273
7374
**manifests** / **letter** / **publisher** / **application** / **version**
7475
@@ -82,24 +83,26 @@ The `PackageIdentifier` and the `PackageVersion` values in the manifest must mat
8283
8384
Thus to set up sparse checkout for all manifests of a publisher, you'd type:
8485
85-
1. If you are using Git version 2.37.0 or newer, run the following command to set up sparse checkout for your folder.
86+
* If you are using Git version 2.37.0 or newer, run the following command to set up sparse checkout for your folder.
8687
8788
```powershell
8889
git sparse-checkout set manifests\<letter>\<publisher>
8990
```
9091
91-
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.
92+
* 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.
9293
9394
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 sparse checkout with multiple folders.
9495
9596
### Step 5: Checkout the repository
9697
97-
You can now apply the sparse checkout settings by running.
98+
You can now apply the sparse checkout settings by running the normal checkout command.
9899
99100
```powershell
100101
git checkout
101102
```
102103

104+
Even if the folder you want to submit hasn't been committed to the repository yet, you must still run the checkout command, as it will be impossible to add (and thus commit) anything without the Git internals it sets up (the index).
105+
103106
If you are entering multiple submissions, create a branch instead of a fork. We currently allow only one manifest file per submission.
104107

105108
```powershell
@@ -145,7 +148,7 @@ If there is ever an error during the process, you will be notified and our label
145148
146149
## Validation process
147150
148-
When you [create a pull request](#step-6-create-a-pull-request) to submit your manifest to the Windows Package Manager repository, this will start an automation process that validates the manifest and processes your pull request. GitHub labels are used to share progress and allow you to communicate with us.
151+
When you [create a pull request](#step-8-create-a-pull-request) to submit your manifest to the Windows Package Manager repository, this will start an automation process that validates the manifest and processes your pull request. GitHub labels are used to share progress and allow you to communicate with us.
149152
150153
### Submission expectations
151154

0 commit comments

Comments
 (0)