3 ms·
> Bizarrely, git won't do a dif of files that have been add-ed to your staging area without this flag Not sure what's bizarre about that. Doing so helps keep y
by MattyRad 10y ago
> Bizarrely, git won't do a dif of files that have been add-ed to your staging area without this flag
Not sure what's bizarre about that. Doing so helps keep your commits clean and helps git tools (diff, git-gutter, etc) by ignoring things you've already stated are complete.
For example, I quickly fix a bug. The code is ugly and I don't want to commit it yet. So I add the bugfix files. Then I clean up the code (before commiting). Now I can do another diff between the staged and unstaged files, checking that it looks better than before, and still works. This way there is 1 clean commit "bugix" and not 2 commits "bugfix" and "bugfix code cleanup"