I just wanted to add another case where this could happen. I used a rare check. For some reason, I had a directory in the working tree that I thought was included in the rare check (I thought it was listed in .git/info/sparse-checkout ), but it wasn’t (I deleted it from .git/info/sparse-checkout for some reason, I forgot.) That way, it was just ignored by pull or checkout or reset or any other commands. This was very confusing until I began to replicate the rare order configuration in a new, new clone and realized the error.
This will only happen to you if you use a rare check. If you do not use a rare check, this cannot happen. (Check git config to see if sparseCheckout is enabled, and check for .git / info / sparse-checkout, but you would know if you are doing this since I think it should be manually configured by the user anyway. ) (Google, if you are interested in what it is - just a simple mechanism to omit files and directories from scanning, which otherwise could be tracked / pulled / extracted, etc.)
source share