From: Jean-François Burdet Date: Fri, 01 Apr 2011 21:49:04 GMT Subject: Re: Problem using git-filter-branch to move tree when repository name contains space Message-ID: <4D964850.3050800@revelate.com> In-Reply-To: <20110401144107.GA3103@sigill.intra.peff.net> What you suggested solved my problem. What a fast answer ! 6minutes ! Thanks, JF. On 01.04.2011 16:41, Jeff King wrote: > The problem is that GIT_INDEX_FILE is an absolute path that contains the > repo name. So it needs to be quoted in the mv command. This should work: > > git filter-branch --index-filter \ > 'git ls-files -s | sed "s-\t\"*-&newsubdir/-" | > GIT_INDEX_FILE=$GIT_INDEX_FILE.new \ > git update-index --index-info && > mv "$GIT_INDEX_FILE.new" "$GIT_INDEX_FILE"' HEAD > > -Peff > >