Re: Why not git reset --hard <path>?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> wrote:
> "git checkout HEAD <pathspec>" is a 99% acceptable substitute for it
> (the only case where it makes a difference is when you added a path to
> the index that did not exist in HEAD).

Er, wait a minute...

"git checkout <tree-ish> <pathspec>" modifies the index?

Damn, I've been using git for years and I never knew that.
I thought it only modified the working tree.

But I just tested, and it does.  Damn, now I have to figure out
how to "leapfrog" a file from history into the working tree without
overwriting the index; that's occasionally useful.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]