From: Junio C Hamano Date: Wed, 17 Dec 2008 20:30:41 GMT Subject: Re: Is it possible to roll back unstaged changes while leaving the staged ones for the next commit? Message-ID: <7vy6yelf2m.fsf@gitster.siamese.dyndns.org> In-Reply-To: "Tim Visher" writes: > My question is this: is it possible to revert the changes that I > haven't staged so that the file looks as if everything inside of it > has been staged because none of the stuff I didn't stage is there > anymore. The last part of the sentence after "because" does not parse for me at all, but I think you are after one of the following: (1) if you want to get rid of garbage changes in your work tree, you would want "git checkout $that_path"; (2) if you want to temporarily stash away further changes in your work tree, because you would want to first test what is staged, commit it, and then later continue to refine the changes stashed away thusly, you would want "git stash --keep-index".