Re: [PATCH] Docs: git checkout --orphan: `root commit' and `branch head'

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

 



Michael Witten <mfwitten@xxxxxxxxx> writes:

> It seems like a more logical approach would be instead for "git
> commit" to take a "--root" option that would create a new root commit
> based on the current index and then point the current branch head to
> the new root commit. Thus:
>
>   $ git checkout -b new_branch old_branch
>   $ # Manipulate or not
>   $ git commit --root
>
> That's how people think.

This may indeed be an improvement. I suspect that we'd need to think about
it a bit more, but it feels right (perhaps introduce this new option,
deprecate --orphan from the checkout, and then eventually remove it
sometime in 1.8.0 timeframe).

>>>  The index and the working tree are adjusted as if you had previously run
>>>  "git checkout <start_point>".  This allows you to start a new history
>>> -that records a set of paths similar to <start_point> by easily running
>>> +that records a set of paths similar to <start_point> by just running
>>>  "git commit -a" to make the root commit.
>>
>> "similar" is an understatement here, maybe "as in"?

I do not think "as in" is an improvement. It completely ignores the
"Manipulate or not" part in the above, and "similar" was very much an
attempt to say "you do not have to commit it right away, but start from
the state and commit a deviation of it".
--
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]