4 ms·
Neat introduction to git, but it suggests using the "git commit -a -m" option, which is not only (edit: partially) redundant with the "git add ." command it rec
by philwelch 17y ago
Neat introduction to git, but it suggests using the "git commit -a -m" option, which is not only (edit: partially) redundant with the "git add ." command it recommends using beforehand, but actually interferes if you're trying to make a more selective commit.
- gonepostal 17y agoThe -a switch for the commit command will only add changes from all files listed in the index. "git add ." will add changed files that are in the index and those that are not. So they are not redundant commands.
- pyre 17y agoHuh? They are redundant if you run them in succession. If you've just added all changes to the index, there is no need to use the -a option to commit unstaged changes to files in the index.
- iamclovin 17y agoYou're right about them being redundant if run in succession. Fixed in the post, thanks!