Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update what-is-git.asc #1799

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update what-is-git.asc #1799

wants to merge 1 commit into from

Conversation

aziz58
Copy link

@aziz58 aziz58 commented Oct 3, 2022

Changes

Context

@@ -83,7 +83,7 @@ Git has three main states that your files can reside in: _modified_, _staged_, a
* Staged means that you have marked a modified file in its current version to go into your next commit snapshot.
* Committed means that the data is safely stored in your local database.

This leads us to the three main sections of a Git project: the working tree, the staging area, and the Git directory.
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