Reputation: 3503
These are my first steps into git
, and I have just started reading this link. In 2.2 Git Basics - Recording Changes to the Repository, you'll find this statement:
When you first clone a repository, all of your files will be tracked and unmodified because Git just checked them out and you haven’t edited anything.
A few lines down the page, you'll find this:
Checking the Status of Your Files
The main tool you use to determine which files are in which state is the git status command. If you run this command directly after a clone, you should see something like this:
$ git status On branch master Your branch is up-to-date with 'origin/master'. nothing to commit, working directory clean
This means you have a clean working directory – in other words, there are no tracked and modified files.
Apparently there is an inconsistency between the words tracked and no tracked highlighted above
Maybe I'm missing something, but as far as I can understand, I would say that the phrase
This means you have a clean working directory – in other words, there are no tracked and modified files.
should be replaced by
This means you have a clean working directory – in other words, there are no untracked or modified files.
I also have doubts about the meaning of the expression Git just checked them out used in the first transcript. I'm speculating here, but does this expression mean that any change in a file, made immediately after the cloning of the repository, can be committed without staging?
Upvotes: 2
Views: 99
Reputation: 2721
The first quote is technically correct, there are no untracked and no modified files just after you clone a repository.
The second quote explains git status
, and the fact that the quoted message means that there are no files that are both tracked AND modified. You could actually be correct, and that could probably also mean there are no untracked, and no modified files. But there's a chance that you create an ignored file, one that matches a pattern from .gitignore
, and git status
wouldn't tell you about that new file.
Upvotes: 4
Reputation:
I don't know enough to comment on the first part of your question.
You can read "Git just checked them out" as "Git just got them from the repo." If you try it for yourself, you will see that you do still need to stage files that you change before committing.
Upvotes: 0