Ran into the exact same problem.
- Add the new file that you created using git add filename1.c
- Make another change in some other filename2.c that was already a part of the repository tracking system.
- Do a git diff and you will only see the change to filename2.c show up. Changes to filename1.c will not show up.
- However if you do a git status you will see the changes in both filename1.c and filename2.c show up.
- Do a git commit -a -m "Changes to filename1.c and filename2.c blah blah"
- Do a git push
You will see that filename1.c got committed.