Hacker News new | ask | show | jobs
by kbr- 1304 days ago
This model doesn't cover the staging area though.
3 comments

My basic understanding

- Untracked: Files that Git doesn't know about.

- Tracked: Files that Git knows about. Further divided into unstaged files (will not be part of the next commit) and staged files (will be part of the next commit).

What helped me here was to know that it's possible to track a (yet untracked) file without staging it:

  git add --intent-to-add <path>
Yeah, it also doesn't cover remotes and the decentralised model of git.

I do think understanding that it's a graph is the first step to grokking git though. The other stuff makes more sense after that (at least in my experience).

I think is healthy to think about staging area as something outside main git model. It's like helpful tool but separate from git repository.