3 ms·
I like what this guy has to say so far, but it's a bit surprising that someone with his knowledge got this wrong: > The Git staging area doesn't have to be thi
by tomxor 9y ago
I like what this guy has to say so far, but it's a bit surprising that someone with his knowledge got this wrong:
> The Git staging area doesn't have to be this complicated. A re-branding away from index to staging area would go a long way. Adding an alias from git diff --staged to git diff --cached
I dislike the mess of crappy synonyms too, but git diff --staged is already an alias, in fact it's the primary way I diff the staging area because it's a well fitting synonym.
- masklinn 9y ago> I dislike the mess of crappy synonyms too, but git diff --staged is already an alias Problematically it's very little used, it's only mentioned once at the very tail end of the `—cached` description, `--cached` is still the primary flag, and the essay remains correct that references throughout the documentation are inconsistent. It's not exactly hard to miss, if e.g. you learn git through the Pro Git book, the option is not mentioned once, and even the full text search has not indexed it. Furthermore, there are many other commands which take a —cached flag but don't have a —staged alias (diff-index, submodule, check-attr, apply, rm)
- dwheeler 9y agoOne small improvement would to make sure that all the options with "--cached" also have "--staged", and make sure that all the documentation uses term "staging" (deprecating "index" and "cached"). The git UI is historically terrible, but it's gotten a little better over time... it could definitely be improved further with a little more effort.