Re: How do I copy a branch & its config to a new name?

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

 



On Fri, Mar 24, 2017 at 1:52 AM, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote:
> Hi,
>
> Ęvar Arnfjörš Bjarmason wrote:
>
>> I couldn't find any previous list discussion about this, but if not I
>> think something like:
>>
>>     git [checkout|branch] --copy src dest
>>
>> Would make sense as an interface for this.
>
> Sounds good to me. :)

Actually this is a bit confusing, but I think reversing the arguments
makes sense, i.e.:

    git branch -c dest [src]

And similarly:

    git checkout -c dest [<src>]

This is confusing in that it reverses the arguments, but more useful
in that it allows you to omit src like the other invocations of these
commands, and you can e.g. do:

    git branch -c avar/topic-2

While on avar/topic to start working on avar/topic-2, which would copy
avar/topic's state & config.

I'll put this on my TODO list, but unless someone comes up with a
compelling argument against the above I plan to make the interface
look like that.




[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]