Re: Keeping a non-1:1 mirror in sync and keeping private branches

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

 



On Sun, Jul 16, 2017 at 02:59:23AM +0200, Jan Danielsson wrote:

>    This seems to accomplish everything I want except that the the "git
> push" deletes any branches I have created on my self-hosted
> repository.

A mirrored push is basically:

  - push all refs, i.e., a "+refs/*:refs/*" refspec

  - enable --prune, to delete any branches that don't exist on the local
    side

But you can do those two things separately if you like.  So your options
are either:

  1. Drop the pruning (in which case deleted branches from the sync may
     accumulate, but depending on the patterns that may or may not be a
     problem).

  2. Use two different namespaces for the synced branches and the
     private ones (e.g., refs/mirror/* in addition to your branches in
     refs/heads/*). The obvious downside is that anybody cloning your
     downstream mirror doesn't pick up refs/mirror unless they configure
     that refspec explicitly.

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

  Powered by Linux