as and addition to biplab malakar
if you use git add on modified files you will stage only those to commit if you want to commit explizit changes but don't pass the files as an explizit list
git commit fileA fileB
vs
git add fileA fileB
git commit
both of them are feasible the second one has it's advantage for example if you have a huge set of changes.
biplab malakar
I have a simple description which I remember always.
Git have two area tracking and non-tracking area. When we run commit then it will process the files those are tracking area and this are known as staging area.
Git stage is a area where files are under tracking of changes.
Now when we create a file or changed the file then it will go under non-tracking area(non-staging), and if we make commit then those files changes are not traced and commit.
For that we enter git add command, which move all files from non-staging area to staging area and then git able to trace the changes of those files.