Very simple case where there is only main, no branches ever (it's my personal website). I edited a couple of files and then tried calling "git commit -m "my changes"" - and it would not commit.
I finally tried first calling "git add filename" and it "added" them. The called "git commit" and it committed them. Then push and all is good.
So clearly I don't understand what add means. What does it mean? Why do I need to again add a file already in my Git repository?
Update:
So I think, based on the comments and answers below (please correct if wrong) that:
- add adds the present content of files to the list of changes that are to be committed. As it's the present content added, subsequent changes to the file are not added to the list.
- commit commits or saves the changed added files to my local repository
- push pushes the local repository changes to the git server