Subject: Re: Git reset --hard with staged changes

From: Junio C Hamano <[email-masked]>
Date: Mon, 09 Jun 2014 16:28:31 -0700

Pierre-François CLEMENT <[email-masked]> writes:

> Hm, I didn't think of "git apply --index"... Makes sense for this
> special use, but I'm not sure about the other use cases.

Try merging another branch that tracks a file your current branch
does not know about and ending up with conflicts during that merge.
Resetting the half-done result away must remove that new path from
your working tree and the index.