Skip to content

Conversation

aziz58
Copy link

@aziz58 aziz58 commented Oct 3, 2022

Changes

Context

This leads us to the three main sections of a Git project: the working directory, the staging area, and the Git directory.

.Working tree, staging area, and Git directory
image::images/areas.png["Working tree, staging area, and Git directory."]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this change disagrees with the caption of the diagram right below it. The diagram itself says "Working Directory", so let's standardize on that. You'll want to update all of these locations.

CleanShot 2022-10-05 at 11 00 38

@solt87
Copy link
Contributor

solt87 commented Nov 22, 2023

I assume the intent of this change is to harmonize the text with the diagram and its caption, which to me seems self-evident. But I think there's a bigger issue here: the portion on the screenshot seems to assume that "working tree" is the same as "working directory", and this change would use "working directory" consistently (at least taking into account @ben's suggestion). However, according to the Git glossary, "tree", "tree object" and "working tree" mean different things, with "tree" being "[...] equivalent to a directory". Whereas the "working tree" "[...] normally contains the contents of the HEAD commit’s tree, plus any local changes that you have made but not yet committed." (My emphasis.)

I think the two decent options would be to either explain both "working tree" and "working directory", and use the terms consistently and correctly, or (and maybe this is preferable in an introductory textbook) use the two terms interchangeably, but mention in parentheses that they aren't exactly the same, with a reference to the glossary.

(I won't even bring up the fact that there is another related term, "worktree", which seems to be different from "working tree", as this complicates an already convoluted matter further. :) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants