My Git Workflow

Category
My Git Workflow

The illustration shows that “git add” is the only (everyday) operation that
can cause the index to diverge from the local repository. The only reason (in
Subversion-emulation mode) to use “git add” is so that “git commit” will see
your changes. The -a option to “git commit” causes “git commit” to run
“git add -u” first – in which case you never need to run "git add -u”
explicitly – in which case the index stays in sync with the repository head.

Git without the index