Reputation: 7391
I have a project structure like the following:
/MyWebsite
../SomeFolder
../SomeOtherFolder
../MyRepo
_.git
The MyWebsite folder isn't a Git repo. Only the MyRepo folder is a local repository (i.e. with a .git folder in it).
However, if I check changed files while inside the MyRepo folder, Git also lists files from the MyWebsite folder (and the other folders within it).
This is really peculiar, I think?
I've looked at similar questions such as Git status picking up parent folder's files, but they don't answer this question - in this case the .git folder is in the right place.
EDIT: My mistake. Everything works as expected. The MyRepo folder accidentally contained a copy of some files from MyWebsite, which threw me off. :/
Upvotes: 0
Views: 119
Reputation: 1019
I can not reproduce your problem by constructing a similar folder hierarchy and use git status. Why does your .git folder has a dash before it? Is it a typo? Or is it possible there is another git repo in other folder besides MyRepo?
Upvotes: 1