Re: [RFC] Reverting individual files to HEAD

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

 



David Kastrup <dak@xxxxxxx> writes:

> The following message is a courtesy copy of an article
> that has been posted to gmane.comp.version-control.git as well.
>
> Junio C Hamano <gitster@xxxxxxxxx> writes:
>
>> But how would you explain "git reset --hard HEAD~24 paths"?
>> Does it move HEAD or not (rhetorical: it shouldn't)?
>
> It doesn't, just like
> git checkout HEAD~24 paths
> does not move HEAD.
>
> Simple rule: commands limited to a file subset don't move HEAD.
>
> Really, I don't see the inconsistency that you seem to find in here.

You are right.  "git reset --soft <commit> paths..." would have
been a much better food-for-thought.
-
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]

  Powered by Linux