4 ms·
No, the author is correct. The add command adds that version of the file to staging, so subsequent changes will need to be added as well if you want them in the
by aninhumer 10y ago
No, the author is correct. The add command adds that version of the file to staging, so subsequent changes will need to be added as well if you want them in the commit.
- deleted 10y ago[deleted]
- nickez 10y agoNo, you can read the following in the man page of git commit: 3. by listing files as arguments to the commit command, in which case the commit will ignore changes staged in the index, and instead record the current content of the listed files (which must already be known to Git);
- aninhumer 10y agoOh indeed, you're right. This didn't occur to me because I've never had a reason to use `git commit [path]`. And I don't know if I'd call this error evidence of the author not understanding git, as much as I'd call it further evidence of the inconsistency they're highlighting.