In brief
git add places selected current contents in the index for the next commit. It does not permanently arrange for every later edit to be included automatically.
Useful to know
git add places selected current contents in the index for the next commit. It does not permanently arrange for every later edit to be included automatically. [1]
Review git diff --cached before recording. When one file contains unrelated fixes, git add -p allows selecting portions. A commit should represent an understandable change rather than an incidental collection of every open file.
Sources
For further detail and to check the information: