Re: Restore a single file in the index back to HEAD

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andy Parkins
Date: Wednesday, November 1, 2006 - 1:39 am

> > I would prefer "git update-index --reset frotz" or "git checkout

Doesn't that update the working directory as well as the index?  My original 
question was addressed perfectly with the point at the "--index-info" switch. 
However, before I asked here I was looking at the man page for update-index 
looking for something like

  git-update-index --reset $FILE

I suppose, if it were being implemented it should be

  git-update-index --reset $COMMIT $FILE

Incidentally, this wouldn't be exactly the same as
  
  git-ls-tree $COMMIT $FILE | git-update-index --index-info

because the git-ls-tree version needs to be run from the root of the working 
directory (this bit me when I first ran it) while the 
(imaginary) "git-update-index --reset" would not.


Andy

-- 
Dr Andy Parkins, M Eng (hons), MIEE
andyparkins@gmail.com
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Restore a single file in the index back to HEAD, Andy Parkins, (Thu Oct 26, 8:41 am)
Re: Restore a single file in the index back to HEAD, Alex Riesen, (Thu Oct 26, 8:42 am)
Re: Restore a single file in the index back to HEAD, Andy Parkins, (Fri Oct 27, 12:27 am)
Re: Restore a single file in the index back to HEAD, Shawn Pearce, (Fri Oct 27, 12:38 am)
Re: Restore a single file in the index back to HEAD, Andy Parkins, (Fri Oct 27, 1:01 am)
Re: Restore a single file in the index back to HEAD, Andreas Ericsson, (Fri Oct 27, 1:08 am)
Re: Restore a single file in the index back to HEAD, Shawn Pearce, (Fri Oct 27, 1:15 am)
Re: Restore a single file in the index back to HEAD, Alex Riesen, (Fri Oct 27, 2:45 am)
Re: Restore a single file in the index back to HEAD, Andreas Ericsson, (Fri Oct 27, 2:50 am)
Re: Restore a single file in the index back to HEAD, Junio C Hamano, (Fri Oct 27, 3:02 am)
Re: Restore a single file in the index back to HEAD, Luben Tuikov, (Fri Oct 27, 10:45 am)
Re: Restore a single file in the index back to HEAD, Nguyen Thai Ngoc Duy, (Wed Nov 1, 12:58 am)
Re: Restore a single file in the index back to HEAD, Junio C Hamano, (Wed Nov 1, 1:07 am)
Re: Restore a single file in the index back to HEAD, Junio C Hamano, (Wed Nov 1, 1:34 am)
Re: Restore a single file in the index back to HEAD, Andy Parkins, (Wed Nov 1, 1:39 am)
Re: Restore a single file in the index back to HEAD, Junio C Hamano, (Wed Nov 1, 1:56 am)
Re: Restore a single file in the index back to HEAD, Nguyen Thai Ngoc Duy, (Wed Nov 1, 2:09 am)
Re: Restore a single file in the index back to HEAD, Andy Parkins, (Wed Nov 1, 2:53 am)