On Thu, Mar 14, 2013 at 11:24:27AM -0700, joeriel...@gmail.com wrote:

> How do I reset one working file, but leave the index alone?  git checkout 
> file does not do that
> (it appears to do nothing), nor does git checkout -- file.
> To clarify, I've edited a file, then added it to the index. I now want to 
> leave the change in the index,
> but reset the working file to the checked-in version.  

git checkout HEAD -- file


git show HEAD:file >file

`git checkout -- file` did not work for you because if you don't specify
where to get the contents from, it assumes the index -- to cite the

  When <paths> or --patch are given, git checkout does not switch
  branches. It updates the named paths in the working tree from the index
  file or from a named <tree-ish> (most often a commit).

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/groups/opt_out.

Reply via email to