Skip to content

Commit 889dabe

Browse files
brabojclaude
andauthored
docs: review nested repositories chapter (#196)
Fix code block language tag, correct cd depth in submodule update, soften subtree drawback wording, capitalize Google Repo, add cross-references to playbook recipes. Closes #155 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 332ce16 commit 889dabe

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

chapters/05-nested-repositories.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ This creates two entries:
4141

4242
After adding, the project looks like this:
4343

44-
```
44+
```text
4545
project/
4646
├── .gitmodules ← URL and path for each submodule
4747
├── .git/modules/<submodule>/ ← submodule's Git database
@@ -69,7 +69,7 @@ $ cd <submodule>
6969
$ git fetch origin
7070
$ git switch main
7171
$ git pull
72-
$ cd ../..
72+
$ cd ..
7373
$ git add <submodule>
7474
$ git commit -m "Update lib submodule"
7575
```
@@ -147,7 +147,7 @@ Unlike submodules, there is no metadata to clean up.
147147
| Advantage | Drawback |
148148
|---------------------------------------------|----------------------------------------------------|
149149
| No extra commands — files are in the repo | Increases repository size (full copy) |
150-
| Works with standard `clone`, `pull`, `push` | Must not mix parent and subtree changes in commits |
150+
| Works with standard `clone`, `pull`, `push` | Mixing parent and subtree changes in one commit complicates `subtree push` |
151151
| No `.gitmodules` or metadata files | Requires understanding of merge strategies |
152152

153153
## 4. Which to use?
@@ -167,9 +167,14 @@ dependency. Use **subtrees** for system-based development where you
167167
want a full copy of the code and expect to modify it alongside your
168168
project.
169169

170+
For step-by-step command references, see the playbook recipes:
171+
[Submodules](playbook/submodules.md),
172+
[Remove a Submodule](playbook/remove-submodule.md),
173+
[Subtrees](playbook/subtrees.md).
174+
170175
## 5. Other tools
171176

172-
- [google repo](https://gerrit.googlesource.com/git-repo/) — manages
177+
- [Google Repo](https://gerrit.googlesource.com/git-repo/) — manages
173178
many Git repositories as a single project (used by Android)
174179
- [git subrepo](https://github.com/ingydotnet/git-subrepo#readme)
175180
alternative to subtrees with cleaner UX

0 commit comments

Comments
 (0)