[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gits] How does git really change one's directory view?

This is not advertised in git documentations I've seen but is "natural" behavior for git users. If you create a branch and populate it with files, those files are seen by "ls" when one checks out that branch. When one checkouts (say) master again, those files are not displayed by "ls".

Who (or what mechanism) arranges this "directory view change" ?  Does a git managed directory become essentially a pointer into a branch-specific directory structure in one's local repo?

To be sure, I even tested Emacs Dired's view, and that too changes (modulo refreshing the dired buffer). So it is not just "ls".