Obviously, there are two things that we must do if we want to commit either a modified file or an unverified file
the first is "staging", the second is "complete"
An intermediate stage is an intermediate stage of any trip, of course, it is not mandatory. The staging process is only to prevent accidental commission. In general, before committing, any new unprocessed files or modifications in any monitored files must be delivered, and then, if we type git commit , the files that are delivered must be committed.
Just the main purpose of the production is to prevent accidental committing. If you use the staging process, itβs convenient for you to discard any changes before committing with git checkout filename .
look at this page: http://git-scm.com/about/staging-area
If you really think that you do not need a staging, you can use git commit -a , it just captures all the current unplayable files and changes in tracked files.
It is always recommended to go through the stage, because you can undo any changes that are not needed in the current commit. if you use git commit -a you don't need to use git add filename to set
source share