From: Bill Lear Date: Wed, 14 Nov 2007 20:22:31 GMT Subject: Re: Cloning empty repositories, was Re: What is the idea for bare repositories? Message-ID: <18235.22791.974033.758825@lisa.zopyra.com> In-Reply-To: <18235.22445.16228.535898@lisa.zopyra.com> [I sent a few mistakes --- edited below.] On Wednesday, November 14, 2007 at 14:16:45 (-0600) Bill Lear writes: >... >Well, here's what we'd like: > >% mkdir new_repo >% cd new_repo >% git --bare init > >[on another machine:] >% git clone git://host/new_repo >% cd new_repo >% git init [No git init would be needed here, obviously.] >[add content] >% git commit -a -m "Initial stuff" >% git push > >So, this is hard work, and other priorities intrude. Ok. > >Instead, we have to 1) figure out how to do this right, because it's >difficult to remember and not intuitive, and 2) once we have "figured >it out", really figure it out, because there are a few gotchas: > >% mkdir new_repo >% cd new_repo >% git --bare init > >% mkdir new_repo >% cd new_repo [git init is needed here...] >[add content] >% git commit -a -m "Initial stuff" >% git config remote.origin.url git://host/new_repo >% git push >[ach! fails! what's up??] >[poke, read, poke some more, try other things..] >[try setting the remote.origin.fetch? No, that doesn't work] >[try setting branch.master.remote? Just edit by hand??] >% git push master >[fails again; read some more; think, think, think...] >% git push origin master >[aha! finally it works] >... Sorry for the sloppiness. Bill