Thread (3 messages) flat view 3 messages, 3 authors, 2016-08-11

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

From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-08-11 19:23:47

On 10/27/06, Junio C Hamano [off-list ref] wrote:
On the other hand, I designed --index-info to be compatible with
ls-tree output (it is not an accident, it was designed).  In

        git ls-tree HEAD frotz | git update-index --index-info

"frotz" part does not have to be the exact path but can be a
directory name.  It means "revert everything in this directory".

This is quite heavy-handed and you would probably want to run
update-index --refresh afterwards.
I would prefer "git update-index --reset frotz" or "git checkout
--index HEAD frotz". git ls-tree|git update-index is too cryptic for
me and too long for my fingers.
-- 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help