Jakub Narebski <jnareb@xxxxxxxxx> wrote: > > On Mon, 12 Feb 2007, Shawn O. Pearce wrote: > >> Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote: > >>> On Mon, 12 Feb 2007, Junio C Hamano wrote: > >>>> $ git read-tree --prefix=git-gui/ git-gui/master > >>>> $ git checkout git-gui > >>> > >>> Didn't you mean "git checkout master" here? > >> > >> I don't think so. At this point the subdirectory git-gui is known > >> in the index, so Junio is trying to get checkout-index to process > >> those paths and create it in the working directory. > > So it is "git checkout -- git-gui" then? Yes. But this trick only works once. After that you cannot use `read-tree --prefix` to load the index with the git-gui/master branch, as there already is stuff under git-gui. Instead you need to whack the directory's files from the index, then reload it. Or abuse mktree, as I did in the script I posted. -- Shawn. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html