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 Thu, Mar 23, 2017 at 12:54:48AM +0100, Ævar Arnfjörð Bjarmason wrote:

> On Wed, Mar 22, 2017 at 11:58 PM, Jeff King <peff@xxxxxxxx> wrote:
> > On Wed, Mar 22, 2017 at 11:46:14PM +0100, Ævar Arnfjörð Bjarmason wrote:
> >
> >> But both of these are really just a limited special case for what I'd
> >> really like, which is given branch "foo", copy it and all its
> >> configuration to a new name "bar". I.e. both of the hacks above only
> >> set up the correct tracking info, but none of the other branch.*
> >> variables I may have set.
> >
> > I thought that's what "git branch -m" was for, though I don't know how
> > thorough it is about finding config that refers _to_ your branch (I know
> > it handles config _for_ your branch).
> >
> > There might be room for improvement there.
> 
> -m can only rename "foo" -> "bar", but I'd like to end up with a new
> "bar" with the same config as "foo"

Ah, I see. You really want "copy". In that case, yeah, I think you'd
need a new command. It might make sense for it to share implementation
with rename (and just do the "add new config" part, skipping the "drop
old config" half).

-Peff



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