2 ms·
> That's because git commit handles its arguments by add-ing them to the index (staging area) before doing the actual committing. That's not what it actually d
by glandium 10y ago
> That's because git commit handles its arguments by add-ing them to the index (staging area) before doing the actual committing.
That's not what it actually does. It commits all the changes from the file (staged or otherwise), and nothing else. It leaves the index/staging area in the same state, except for the committed file.
That is:
git add foo bar baz
git commit foo
will commit any change to foo, and leave bar and baz alone (staged and non staged parts).