The files present in the staging area can be sent into the local repository. Based on these commits different versions of the files/programs/code will be stored.
These commits can be used to track which features/code added on which commits and by who, so we can easily track or even revert the whole commit if something bad happened to the source code.
To commit the files, we can use git commit -m “message” command.
Once you commit the files, if you check the status it will not show any files because all files are committed. If you do any modifications to the existing files or add any new files then those files will be listed as untracked files.
To find the list of commits that are done into local repository, we can use git log command.