Re: How to git checkout a orgin(unstage) version file in another directoy?

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: How to git checkout a orgin(unstage) version file in another directoy?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:50:35

Michael J Gruber [off-list ref] writes:
I'm not sure what you mean by "origin" version, but if you mean the
version from the current revision (before making and staging changes),
you would check out from HEAD instead of from the index:

git --work-tree=. --git-dir="/media/linux/t/kernel/.git" checkout HEAD
-- README
Wouldn't that still affect the index in /media/linux/t/kernel/.git/index,
making /media/linux/t/kernel/README and the index entry out-of-sync?

Re: How to git checkout a orgin(unstage) version file in another directoy?

From: Michael J Gruber <hidden>
Date: 2016-06-15 22:50:35

Junio C Hamano venit, vidit, dixit 17.02.2011 19:33:
Michael J Gruber [off-list ref] writes:
quoted
I'm not sure what you mean by "origin" version, but if you mean the
version from the current revision (before making and staging changes),
you would check out from HEAD instead of from the index:

git --work-tree=. --git-dir="/media/linux/t/kernel/.git" checkout HEAD
-- README
Wouldn't that still affect the index in /media/linux/t/kernel/.git/index,
making /media/linux/t/kernel/README and the index entry out-of-sync?
Yes. I guess you overlooked the two posts where Chunlin and I realised
that I took his request for "checkout" too giterally.

Michael
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help