On Fri, Feb 12, 2016 at 10:01 AM, Dale R. Worley <wor...@alum.mit.edu>

> Suppose I've modified a file, or a set of files, and I want to return it
> to the state in HEAD.  I thought that "git checkout HEAD file1 file2
> ..." would do that, but git-checkout wants to preserve whatever changes
> are present in the file tree.  I'm sure that buried in Git's UI is a
> command form that will do this easily, and I probably knew it once, but
> I've forgotten.

​I generally do

git checkout HEAD -- file1 file2

Note the -- between HEAD and the file names​

> Dale

The man has the intellect of a lobotomized turtle.

Maranatha! <><
John McKown

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to