Re: how to use two bare repositories?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 12, 2008, 00:12 UTC
- Message-ID
- <7vabk0nd6x.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20080411234430.GQ29940@cs-wsok.swansea.ac.uk>
Oliver Kullmann <O.Kullmann@swansea.ac.uk> writes:
Show 15 quoted lines
>> > The problem is now that it seems not to be possible >> > to update B: >> > >> > 1. pulling from A is not possible since B is bare; >> > 2. fetching from A seems to work, checking the content of >> > B via gitk seems to indicate that B has been updated >> > --- however pulling from B doesn't work >> >> The usual answer when you see a word "http" mentioned is... >> >> how are you arranging update-server-info to be run whenever B is >> updated? > > Aha, I see: So first I fetch, and then I run update-server-info. > Just tried it out, and it worked. Thanks!
Typically, you would update a bare repository used for publishing by pushing into it, and trigger update-server-info from the post-update hook.
But it is perfectly fine if you initiate a mirror-fetch from that publishing repository (in your case, "B"), and the caller to "git fetch" can run update-server-info after fetching.
And no, there is not a "post-fetch" hook, nor is there a need for one.