Re: What to expect after GIT 0.99.7
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Sep 19, 2005, 14:34 UTC
- Message-ID
- <Pine.LNX.4.58.0509190727110.9106@g5.osdl.org>
- In-Reply-To
- <7vwtldsbv2.fsf@assigned-by-dhcp.cox.net>
On Mon, 19 Sep 2005, Junio C Hamano wrote:
Show 6 quoted lines
> > I used to do 'cvs update -p foo.c >foo.c', and extending > git-checkout may be familiar to cvs migrants. The most > roundabout way (albeit with perhaps least typing) is: > > git-tar-tree HEAD | tar xf - foo.c
Uhh.
I use
git-checkout-index -f -u foo.c
which works fine. Of course, that doesn't help if you've updated the index, but then I actually think it's fine to expose the index.
Now, admittedly, we should probably make that easier to do.
If you want to reset to the HEAD state _and_ your index is stale, I'd just precede it with a
git reset
and be done. Yes, it will reset your whole index, not just that file, but hey, big deal. In practice it works fine.
Show 5 quoted lines
> I originally talked about reverting file(s) in the working tree, > but I wonder if reverting a cache (eh, index) entry to the state > in a committed tree is useful. read-tree with a pathspec to > overwrite index entries for specified paths while leaving others > intact. We could think of it as undoing git-update-index.
Yes, I think it would be useful to be able to read in just part of the tree.
Linus