Skip to content

Commit d2359bb

Browse files
committed
Improve sparse-checkout documentation
1 parent 093a6ee commit d2359bb

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

docs/tips.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,26 @@ only work in a few specific directories (the ones for your own packages). Git
88
allows for "sparse checkouts", which reduce the time it takes to clone the
99
repository and its size on your disk.
1010

11-
Follow these steps to clone the repository:
11+
First, make sure you have cloned the repository. Then, follow these steps to
12+
clone the repository:
1213

1314
```sh
14-
git clone --depth 1 --no-checkout --filter="tree:0" [email protected]:typst/packages
15+
git clone --depth 1 --no-checkout --filter="tree:0" [email protected]:{your-username}/packages
1516
cd packages
1617
git sparse-checkout init
1718
git sparse-checkout set packages/preview/{your-package-name}
19+
git remote add upstream [email protected]:typst/packages
20+
git config remote.upstream.partialclonefilter tree:0
1821
git checkout main
1922
```
2023

24+
The `packages` directory you are in still corresponds to the whole repository.
25+
Do not delete or edit the `README.md`, `LICENSE` or any other file at the root.
26+
Instead, create the directory `packages/preview/{your-package-name}/{version}`
27+
and copy your files here. Note that `packages/` is a directory in the
28+
`packages` repository: if you look at the full path, there should be two
29+
consecutive parts called `packages`.
30+
2131
## Don't use submodules
2232

2333
The Typst package repository requires the files to be actually copied

0 commit comments

Comments
 (0)