I got the solution to my problem here https://stackoverflow.com/a/23087593/5253746
But, I want to know why the problem occurs. I added image files to .gitignore. Then, I made some new folders with code and images. I decided to remove the image files from .gitignore.
From a sub-folder in my repository, I did git add ., git commit -m "message", git push which were successful. When I did git status I see the same git status before the commit/push.
Why does this happen ?