[openib-general] git: cloning partial tree

Michael S. Tsirkin mst at mellanox.co.il
Sun Nov 5 00:08:43 PST 2006


Quoting r. Eitan Zahavi <eitan at mellanox.co.il>:
> > But you can check out just the infiniband part of the tree:
> > git checkout master `git-ls-tree -r --name-only master \
> >                    include/rdma include/scsi/srp.h drivers/infiniband \
> >                    Documentation/infiniband ofed_scripts kernel_patches`
> > echo 'ref: refs/heads/master' > .git/HEAD
> >
> >
> >   
> Thanks, but  I have tried this can got back:
> fatal: Not a git repository
> fatal: Not a git repository

You should clone with -n (don't checkout) flag first.
On a shared filesystem, you can also use -s to save disk and make clone go
faster.

-- 
MST




More information about the general mailing list