Re: Update a bare repository

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeff King
Date: Tuesday, July 17, 2007 - 12:04 am

On Tue, Jul 17, 2007 at 08:30:26AM +0200, Thomas Glanzmann wrote:


You don't want to pull because that involves merging, which doesn't make
sense. A git-fetch is what you want, and you can use wildcards to make
sure you get all of the refs. The default is something like this:

[remote "origin"]
  url = git://git2.kernel.org/pub/scm/git/git.git
  fetch = +refs/heads/*:refs/remotes/origin/*

However, if you are intending to make this an _exact_ copy of Junio's
(because you will be fetching from it with your other, non-bare repos),
then you probably don't want the "separate remotes" layout. You want to
copy the refs with the same names:

[remote "origin"]
  url = git://git2.kernel.org/pub/scm/git/git.git
  fetch = +refs/heads/*:refs/heads/*

The "+" in both cases means that it copies whatever Junio has, even if
it might lose some commits of yours. But that seems to be what you want
in this case.


The simplest thing is not to give write access to the repo for your
pushers. However, you could also put in a pre-receive hook that rejects
all pushes.

-Peff
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Update a bare repository, Thomas Glanzmann, (Mon Jul 16, 11:30 pm)
Re: Update a bare repository, Jeff King, (Tue Jul 17, 12:04 am)
Re: Update a bare repository, Thomas Glanzmann, (Tue Jul 17, 12:26 am)
Re: Update a bare repository, Jeff King, (Tue Jul 17, 12:31 am)
Re: Update a bare repository, Thomas Glanzmann, (Tue Jul 17, 12:41 am)