Re: Cloning empty repositories, was Re: What is the idea for bare repositories?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 14, 2007, 00:25 UTC
- Message-ID
- <7vejetr7vn.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <vpqd4ud6c0z.fsf@bauges.imag.fr>
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
Show 9 quoted lines
> (2) > > $ mkdir ~/bare-repo > $ cd ~/bare-repo > $ git --bare init > $ cd > $ mkdir local/non-bare > $ cd local/non-bare > $ git init
...
If your publishing repo is local like the above, then
$ mkdir /tmp/junk && cd /tmp/junk $ git init; tar xf /tmp/project.tar; git add .; ... populate ... $ git commit -m initial $ cd /else/where/to/publish $ git clone --bare /tmp/junk myproject.git $ rm -fr /tmp/junk
would be enough to get your published repository started, isn't it? Then wouldn't:
$ cd $HOME $ git clone /else/where/to/publish/myproject.git myproject
set up your ~/myproject exactly the same way as other people who will work with that published repository?