Re: How to git push mirror local refs only?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 19, 2017, 17:58 UTC
- Message-ID
- <xmqq4lvbuaef.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CAHd499Aft6yE=8f8DGRVxMYNR5kg6AVs3tECVtz1VDdwFeL5fg@mail.gmail.com>
Robert Dailey <rcdailey.lists@gmail.com> writes:
Show 21 quoted lines
> On Fri, Jun 9, 2017 at 8:53 PM, Junio C Hamano <gitster@pobox.com> wrote: >> Robert Dailey <rcdailey.lists@gmail.com> writes: >> >>> So I want to update my remote fork with all my local branches. >>> Normally I'd do this: >>> >>> $ git push --mirror fork >>> ... >> Something along this line in your .git/config: >> >> [remote "fork"] >> url = ... >> push = refs/heads/*:refs/heads/* >> >> and then >> >> $ git push --prune --follow-tags fork > > Sorry for the late reply, I was out of town all last week. Thanks for > your help. Does this serve as a good general default? I can't imagine > a case where I'd ever want to push something inside refs/remotes.
It may, as a good general default to something other than --mirror, perhaps. When I ask for mirroring the state of my repository, I'd expect it to preserve as much state as possible, including the tips of histories I received from elsewhere.