Yes, the same general workflow can be applied, but the add command can also be used more selectively, adding only certain files or only certain parts of files for each commit. This makes it easy to split logically different patches into different commits, which makes tracking and sharing easier with others.
But yes, you can just "git add". and everything will go to the intermediate area for fixing. As mentioned in another answer, "git commit -a" is a partial shortcut (it will not add new files, but will commit all changes / deletions of already tracked files). Try "git status" to see what will be included in your next commit and what will not.
UPDATE It should also be noted that the addition to git add is "git reset HEAD", which removes the file from the staging area for the next commit. In addition, if you want to split the editing in one file into several commits, use the โ-pโ flag for both git add and git reset to execute the interactive file and choose which fragments to add / reset.
source share