Re: Question: git clone --no-checkout behavior

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

 



Bryan Turner <bturner@xxxxxxxxxxxxx> writes:

>> If you populated $GIT_DIR/index from the tree of HEAD, you would see
>> everything is deleted in the working tree.  You can simulate it by
>> doing this:
>>
>>         git clone -n $over_there here
>>         cd here
>>         git read-tree HEAD
>>         git status
>>
>> But it would not help people who want to check another branch out
>> immediately after cloning with -n, which is the whole point of the
>> option, so...
>
> Is the reset call in my example in essence performing that same read-tree,
> when it unstages the changes?

"git reset" (without any other parameters) reads the HEAD tree into
the index without touching the working tree, so I think it is
probably equivalent.
--
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]