Why can I not open my folder in GitHub?

The "src" folder in one of my repository is grayed out (and is not clickable):

screenshot

I took the following steps before pushing to the GitHub:

  1. I created a new repository on GitHub.
  2. I initialize dthe git on my project.
  3. git add .
  4. git commit -m "comment"
  5. git remote add origin url
  6. git push -u origin master
  7. username
  8. password

The "src" folder is showing up on GitHub but cannot be opened. What can I do?


Solution 1:

I solved the problem by deleting .git folder inside subfolders (Hidden files and folders). You should have only one .git in the root folder.

Git recognized that folder as modified but untracked content.
There are other solutions for this problem, look this thread: Git - how to track untracked content?

Solution 2:

There are two possible reasons to this

  1. You have a git folder within a git folder i.e. your src folder is a git folder itself. To fix that simply delete the .git folder within the src and
git add <foldername>
git commit -m "commit msg"
git push origin master

Incase if it still doesn't get fixed then, there maybe the problem because of cache. To fix that simple type

git rm --cached <foldername>

and repeat the above steps again. Your problem should get fixed.

Solution 3:

The icon mean that you have marked this folder as submodule. open your .gitmodules and you will see there the folder named as src bin.

Remove them from your submodule and it will become a regular folder

What is this grey git icon?