Skip to content

Commit 7ea2d73

Browse files
brabojclaude
andcommitted
docs: remove forward references from bare/non-bare explanation
Replace paragraph that used push, branch reference, and staged — terms not introduced until later chapters. Keep the explanation to structure and purpose only. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 044a643 commit 7ea2d73

1 file changed

Lines changed: 5 additions & 12 deletions

File tree

chapters/02-building-blocks.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,11 @@ The `.git` folder contains the same structure as a bare repository.
8888
The difference is that a non-bare repository also has a working tree
8989
next to it — the place where you do your actual work.
9090

91-
A bare repository is designed to be a shared hub — it accepts pushes
92-
from other repositories. You cannot run `git add` or `git commit`
93-
inside it because there is no working tree to stage files from. All
94-
changes must arrive via `git push` from another repository.
95-
96-
Pushing to a non-bare repository is rejected by default. The reason:
97-
a push updates the branch reference, but it does not touch the working
98-
tree. If Git allowed it, the person working in that repository would
99-
have files from the old commit while the branch points to the new one —
100-
their working tree and their branch would be out of sync, and any
101-
staged work could be silently lost. Bare repositories avoid this
102-
problem entirely because there is no working tree to desynchronize.
91+
A bare repository is designed to be a shared hub. Because it has no
92+
working tree, nobody edits files in it directly — it only receives
93+
changes sent from other repositories. A non-bare repository is the
94+
opposite: it is where you do your day-to-day work — editing files,
95+
recording snapshots, and browsing history.
10396

10497
## 3. Object Model
10598

0 commit comments

Comments
 (0)