From: Boaz Harrosh Date: Mon, 04 Feb 2008 13:10:38 GMT Subject: Re: New to git: sorry for obvious question. Message-ID: <47A70ECE.2040606@panasas.com> In-Reply-To: <20080204105006.GA15855@bit.office.eurotux.com> On Mon, Feb 04 2008 at 12:50 +0200, Luciano Rocha wrote: > On Mon, Feb 04, 2008 at 09:56:00AM +0000, Paul Gardiner wrote: >> Hi, >> >> I've moved a project from CVS on sourceforge to git on repo.or.cz. I >> want a local mirror on my own home server, so that it appears amongst >> the projects shown by my own gitweb set up, and so it gets caught by >> my backup system. I've created the mirror with >> >> git clone --bare >> >> and that seems fine. But how do I now keep it up to date. I was >> guessing a cron job doing some sort of git pull, but pull doesn't >> look to work on --bare proj.git type repositories. > > You want git fetch. Git pull also updates the working copy, which you > don't have. > > Also, git clone --bare doesn't set up the origin configuration, and I > have to do it by hand: > git config remote.origin.url "$url" > git config remote.origin.fetch "+refs/heads/*:refs/heads/*" > Better do "git-remote add URL" then manual addition as above. Boaz