It’s mostly an error in your mental model of how git thinks about these things.
You’ve got, basically, 3 “buckets” in git:
-
the repository, where committed things live
-
the “index” which is basically a staging area where you can put things before you commit them,
-
the working copy, which is basically what you see in the directory, and make changes to.