Reputation: 45
I have git repo, I found that when using git log myfile
, only files under the root (where the .git
folder is) show logs. Doing the same to any file in a sub directory does not show anything. Why?
Similarly, when using git extension, right-clicking a file and clicking "file history", only files in root folder have history. All other files do not have history - it will say "git is not initialized"
Did I miss some settings?
Upvotes: 2
Views: 218
Reputation: 1324417
One explanation would be a .gitignore
which ignores sub-folders (*/
)
That would explain that a git add .
or a git status
do nothing regarding said subfolders.
(Even though the OP thinks "all files have been added". If they actually are in the index, then the .gitignore
rules don't apply, as majioa comments)
Check also your environment variables (GIT_DIR
, GIT_WORK_TREE
) to see if they are set to anything that could confuse Git in your folder.
Do a git ls-files --stage
in the root folder of your repo in order to check for special entries in the index which would explain why sub-folders content are of a different nature (a submodule being one).
Upvotes: 1