src
and bin
are git submodules
. They're not browsable because they are only pointers to other git repositories - they're not really "folders".
To add everything in a directory and subdirectories to git in one command, you can use git add .
, which recursively adds.
Section 6 of the Pro Git book explains what a submodule is.
Assuming you do not want submodules, you can fix your repository like this:
cd <project> # Go to the projects root
rm -rf .git # Remove all git information (keeping your code).
cd src # and repeat for src and bin
rm -rf .git
cd ../bin
rm -rf .git
cd .. # now, back in the projects root
git init # Make a git repository
git add . # Add everything to it
git commit -m 'Initial commit'
git remote add github <github-url>
git push -f github # Force push to github, to overwrite everything we had before.
Note that this will destroy the git repos in src
and bin
!!
I'm pretty sure this is what you want to do.