Re: understanding index
- From
- Nicolas Sebrecht <nicolas.s-dev@laposte.net>
- Date
- Jan 31, 2009, 20:19 UTC
- Message-ID
- <20090131201920.GC29748@ultras>
- In-Reply-To
- <adf1fd3d0901310409y28dc493ak358749e0c29154cc@mail.gmail.com>
On Sat, Jan 31, 2009 at 01:09:49PM +0100, Santi Béjar wrote:
Show 7 quoted lines
> You omitted the help message of git status, where it says how to unstage: > # Changes to be committed: > # (use "git reset HEAD <file>..." to unstage) > > So to not commit foo at all: > > git reset HEAD foo
Thanks. I didn't omitted the help message of git status. The "unstage" action is what I was looking for but I was wrongly presuming (and I've read git docs !) that 'HEAD' is a kind of shortcut to the last commit of the current branch (not to the last state of the working tree).
Working on branch master for example, we have in .git/HEAD : ref: refs/heads/master And in .git/refs/heads/master, the hash of the last commit of branch master.
I'm missing something here. But what ?
-- Nicolas Sebrecht