Re:Gitless a simple VCS built on top of Git
by Certhas on Saturday June 17, 2023 @03:12PM
(#36373487)
That's incorrect. Git considers files tracked if they are in the last commit or staged. As far as I am aware it considers files untracked if they are not tracked and not ignored (though git clean -x suggests that it considers such files untracked and simply ignores them for most purposes, which also makes sense). So un/tracked depends on last commit, staging area and .gitignore.
> Remember that each file in your working directory can be in one of two states: tracked or untracked. Tracked files are files that were in the last snapshot, as well as any newly staged files; they can be unmodified, modified, or staged. In short, tracked files are files that Git knows about.
> Untracked files are everything else — any files in your working directory that were not in your last snapshot and are not in your staging area.
> Remember that each file in your working directory can be in one of two states: tracked or untracked. Tracked files are files that were in the last snapshot, as well as any newly staged files; they can be unmodified, modified, or staged. In short, tracked files are files that Git knows about.
> Untracked files are everything else — any files in your working directory that were not in your last snapshot and are not in your staging area.
https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-...