I tried everything suggested on whole Stackoverflow. Nothing including -a or -am or anything helped.
If you are the same, do this.
So, the problem is, git thinks some of your subdirectory is sub-project in your root-project. At least, in my case it wasn't like that. It was just regular sub-directory. Not individual project.
Move that regular sub-directory which is not being pushed at some temporary location.
Remove the hidden .git folder from that directory.
cd
to the root directory.
git init
again.
git add .
again.
git commit -m "removed notPushableDirectory temporarily"
git push -f origin master
We will have to force it as the git will see the conflict between remote git and your local structure. Remember, we created this conflict. So, don't worry about forcing it.
Now, it will push that sub-directory as sub-directory and not as sub-module or sub-project inside your root-project.