Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.
- From
Stephan Beyer <s-beyer@gmx.net>
- Date
- Oct 29, 2008, 15:22 UTC
- Message-ID
- <20081029152202.GA10029@leksak.fem-net>
- In-Reply-To
- <alpine.DEB.1.00.0810291604200.22125@pacific.mpi-cbg.de.mpi-cbg.de>
Hi,
Johannes Schindelin wrote:
> So saying "this is what aliases are for" you ask for _newbies_ to add it > for themselves. We are talking the same newbies who should be helped by > that command, and typically do not know that there are Git aliases yet.
I'm not sure if yet more commands really help newbies.
I *see* the problem that talking about the index, the cache and the staging area can be difficult to newbies. But then I'd rather vote for "git diff --staged" (instead of --cached) or "git show --staged" (both make sense in some way). Perhaps it is even sufficient to add a help text to "git status", like this:
# Changes to be committed: # (use "git reset HEAD <file>..." to unstage) +# (use "git diff --cached" to see a diff of staged files)
For me, a "git staged" feels wrong without a "git stage" (alias for "git add") and "git unstage <file>" (alias for "git reset <file>"). And I think the list of examples can easily be continued.
Regards, Stephan
-- Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F