[openfabrics-ewg] git question

Michael S. Tsirkin mst at mellanox.co.il
Mon Oct 23 22:54:29 PDT 2006


Quoting r. Minich, Makia <minich at ornl.gov>:
> Subject: Re: git question
> 
> OK, so basically, I did the following (from the development wiki):
> 
>       git clone -s --bare git://www.mellanox.co.il/~git/infiniband .git
>       git checkout ofed_1_1 `git-ls-tree -r --name-only ofed_1_1 \
>                    include/rdma include/scsi/srp.h drivers/infiniband \
>                    Documentation/infiniband ofed_scripts kernel_patches`
>       echo 'ref: refs/heads/ofed_1_1' > .git/HEAD
> 
> At this point, I have all of the OFED specific files, but I see that .git/remotes/origin file is not created.  So, perhaps a few more lines are needed on the wiki for how to create this file (if someone wants to follow this path rather than download the entire kernel source) and perhaps do an update (if so desired).
> 
> Thanks...

Commands above do a partial checkout - just the IB sources.
If you want to do updates on working copy, you must do a full checkout,
so that git can do merges.

Something like:

git clone -s --bare git://www.mellanox.co.il/~git/infiniband .git
git checkout ofed_1_1
cat <<EOF > .git/remotes/origin
URL: /mswg/git/infiniband/.git
Pull: refs/heads/ofed_1_1:refs/heads/origin
EOF

Please note that the proper equivalent of svn update in git is
git fetch && git rebase, not git pull.

If you don't expect a need to do merges, you can create
a bare clone of the upstream repository, and then do a new
partial checkout out of there after each update.

-- 
MST




More information about the ewg mailing list