add * means add all files in the current directory, except for files whose name begin with a dot. This is your shell functionality and Git only ever receives a list of files.
add . has no special meaning in your shell, and thus Git adds the entire directory recursively, which is almost the same, but including files whose names begin with a dot.
version control - git add * (asterisk) vs git add . (period) - Stack Overflow
What does the 'git add .' ('git add' single dot) command do? - Stack Overflow
What's the difference between "git add *", "git add ." and "git add -A"?
What are 'git add' and 'git commit' doing and how are they different from each other?
Videos
add * means add all files in the current directory, except for files whose name begin with a dot. This is your shell functionality and Git only ever receives a list of files.
add . has no special meaning in your shell, and thus Git adds the entire directory recursively, which is almost the same, but including files whose names begin with a dot.
* is not part of git - it's a wildcard interpreted by the shell. * expands to all the files in the current directory, and is only then passed to git, which adds them all.
. is the current directory itself, and git adding it will add it and the all the files under it.
git add . adds / stages all of the files in the current directory. This is for convenience, and can still be used if you have certain files you don't want to add by using a .gitignore
A tutorial for .gitignore is located here.
A deeper look into git add . vs git add -A vs. git add -u is located here and it might answer your question if you wanted more control of how you add all of the files / wanted to know how git add . works.
git add . adds all modified and new (untracked) files in the current directory and all subdirectories to the staging area (a.k.a. the index), thus preparing them to be included in the next git commit.
Any files matching the patterns in the .gitignore file will be ignored by git add.
If you want to skip the git add . step you can just add the -a flag to git commit (though that will include all modified files, not just in the current and subdirectories).
Note that git add . will not do anything about deleted files. To include deletions in the index (and the comming commit) you need to do git add -A
I just learned the basics of github. I understand how to use it but don't quite understand why it is necessary to use 'git add --> git commit --> git push', instead of just 'git commit --> git push'.
I googled and found : "Add tells git to start tracking a file. ... You can combine both actions with git commit -a. Git commit commits the files in the index to the repository, git commit -a is a shortcut to add all the modified tracked files to the index first. Commit commits your current changes on your local repository.", but tbh I don't quite understand what it means, so perhaps I need an ELI5 version.
TL;DR: ELI5: What are 'git add' and 'git commit' doing, and how they are different from each other?