I’ve just created a new project in htdocs/project and when I use a status to pick up the files in that folder it is listing the files and directories contained in htdocs/project but it is also listing all the folders and children of htdocs as well.
For example:
# Changes not staged for commit:
# modified: ../otherproject/index.php
# modified: ../project3/index.php
# Untracked files:
# ../otherproject/blah.txt
# ../project3/img/lol.jpg
If it helps I used the “Git Bash Here” option to change my Git directory to htdocs/project.
Is ‘htdocs’ itself a git repo?
If so, that would explain what you’re seeing – a git repo can’t have another repo within it.
(Posted as an answer rather than a comment because I don’t have enough persimmons.)
Edit: Based on the discussion below, this seems to be the problem. According to http://progit.org/book/ch6-4.html:
I haven’t done this myself, so hopefully someone who has will volunteer some experiences.