progit / progit2

Pro Git 2nd Edition
Other
5.77k stars 1.9k forks source link

ch-10: avoid unnecessary mention update-index's --add #1738

Closed sivaraam closed 2 years ago

sivaraam commented 2 years ago

Changes

The book clearly mentions that --add needs to be passed to 'git update-index' only when the file is new to the index. When the second version of 'test.txt' is added, the index know about the file already.

So, avoid passing the '--add' when adding the second version of 'test.txt'

ben commented 2 years ago

Nice. Thanks!