From: Andy Parkins Date: Thu, 26 Oct 2006 15:41:09 GMT Subject: Restore a single file in the index back to HEAD Message-ID: <200610261641.11239.andyparkins@gmail.com> Hello, I have something like this: # On branch refs/heads/newmaster # Updated but not checked in: # (will commit) # # modified: oops/file1 # modified: good/file2 # modified: good/file3 # modified: good/file4 i.e. the index has been updated to hold oops/file1 If I then didn't want to commit oops/file1, how do I restore the HEAD oops/file1 back to the index without doing a full reset? What I'm wishing for is a per file reset... git-reset --mixed HEAD oops/file1 (I realise that the above is crazy, but I hope it's explaining what I want). When I do a git checkout -f oops/file1; I get "git checkout: updating paths is incompatible with switching branches/forcing Did you intend to checkout 'oops/file1' which can not be resolved as commit?" Andy -- Dr Andy Parkins, M Eng (hons), MIEE