Skip to content

Commit c5766de

Browse files
authored
Merge pull request #1890 from dscho/explain-better-how-to-develop-this-site-with-sparse-checkouts
README: clarify how to start working on this site locally
2 parents 7cc1663 + 643b333 commit c5766de

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,26 @@ This site is built with [Hugo](https://gohugo.io/) and served via GitHub Pages.
88

99
## Local development setup
1010

11-
It is highly recommended to clone this repository using [`scalar`](https://git-scm.com/docs/scalar); This allows to work only on the parts of the repository relevant to your interests. You can select which directories are checked out using the [`git sparse-checkout add <directory>...`](https://git-scm.com/docs/git-sparse-checkout) command. The relevant directories are:
11+
> [!NOTE]
12+
> It is highly recommended to clone this repository using [`scalar`](https://git-scm.com/docs/scalar); This allows to work only on the parts of the repository relevant to your interests. You can select which directories are checked out using the [`git sparse-checkout add <directory>...`](https://git-scm.com/docs/git-sparse-checkout) command. Typically, you will want to start like this:
13+
14+
```ShellSession
15+
$ scalar clone https://github.com/git/git-scm.com
16+
$ cd git-scm.com/src
17+
$ git sparse-checkout set layouts content static assets hugo.yml data script
18+
19+
If your Git installation comes without `scalar`, you can create a sparse, partial clone manually, like this:
20+
21+
```ShellSession
22+
$ git clone --filter=blob:none --no-checkout https://github.com/git/git-scm.com
23+
$ cd git-scm.com
24+
$ git sparse-checkout set layouts content static assets hugo.yml data script
25+
$ git reset --hard
26+
```
27+
> [!NOTE]
28+
> If you _already_ have a full clone and wish to accelerate development by focusing only on a small subset of the pages, you may want to run the `git sparse-checkout set [...]` command mentioned above.
29+
30+
Here is a detailed list of the relevant directories:
1231

1332
- If you want to test any page rendering using Hugo:
1433
- layouts/

0 commit comments

Comments
 (0)