Skip to content

Commit dbf62ad

Browse files
brabojclaude
andcommitted
docs: flatten bare/non-bare headings into section flow
Remove H3 headings for bare and non-bare repositories in Chapter 2 — they interrupted the section flow. Bold lead-in text replaces them. Update cross-reference anchor in the bare-repositories recipe. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 64e8271 commit dbf62ad

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

chapters/02-building-blocks.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,13 @@ A repository can be **local** (on your machine) or **remote** (on a
3737
server like GitHub). Git treats both as equals — you can push to and
3838
pull from any repository you have access to.
3939

40-
Git supports two repository layouts:
40+
Git supports two repository layouts**bare** and **non-bare**.
4141

42-
### Bare Repository
43-
44-
A **bare repository** is a Git repository without a working tree — it
45-
contains only the `.git` internals (objects, refs, config) and no
46-
checked-out files. Hosting services like GitHub and GitLab store repositories as bare
47-
on the server. When you edit a file through GitHub's web interface,
48-
GitHub creates a commit directly — it does not use a working tree.
42+
A **bare repository** has no working tree — only the Git internals
43+
(objects, refs, config) and no checked-out files. Hosting services like
44+
GitHub and GitLab store repositories as bare on the server. When you
45+
edit a file through GitHub's web interface, GitHub creates a commit
46+
directly — it does not use a working tree.
4947

5048
> **Note:** "bare" and "remote" are not the same thing. A remote is any
5149
> repository you connect to via URL. Remotes are *usually* bare, but a
@@ -65,8 +63,6 @@ PROJECT.GIT/
6563
└───tags # Tag references
6664
```
6765

68-
### Non-bare Repository
69-
7066
A **non-bare repository** (also called a regular or working repository)
7167
is what you get when you clone or run `git init`. It has a working tree
7268
where you create, edit and delete files, plus a hidden `.git` folder

chapters/recipes/bare-repositories.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ multiple developers push to. Hosting services like GitHub and GitLab
1313
store every repository as bare on the server.
1414

1515
For the theory behind bare vs non-bare repositories, see
16-
[Building Blocks](../02-building-blocks.md#bare-repository).
16+
[Building Blocks](../02-building-blocks.md#2-repository).
1717

1818
### Create a bare repository
1919

0 commit comments

Comments
 (0)