One command was missing in all the answers.
First, try the git add . then git commit -m "some msg" then git push.
If that doesn't work then move on the the approach given below:
In my case, nothing was working until I used this command:
git push --set-upstream origin master