Re: Additional remote on a local clone. Where do the objects go?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, Sep 1, 2010 at 3:12 PM, Stephen Kelly <steveire@xxxxxxxxx> wrote:
> git clone git://gitorious.org/qt/qt.git qtrepo
> cd qtrepo
> git checkout -b 4.7 origin/4.7
> git checkout -b 4.6 origin/4.6
> git clone qtrepo qt46
> cd qt46 && git checkout -b 4.6 origin/4.6
> cd ..
> git clone qtrepo qt47
> cd qt46 && git checkout -b 4.7 origin/4.7
> cd ..

Two improvements: shared objects, and configuring git-pull:

  git clone git://gitorious.org/qt/qt.git qtrepo
  git init qt46
  PARENT_GIT=$(pwd)/qtrepo/.git
  cd qt46

  # use of shared objects - tell git where to find the "missing" objects
  cat $PARENT_GIT/objects > .git/objects/info/alternates

  # setup of git pull
  cat <<EOF >> .git/config
[remote "parent"]
  url = $PARENT_GIT
[branch "master"]
  remote = parent
  merge = refs/remotes/origin/4.6
EOF

  # done!
  git pull

Repeat for 4.7.

If you want to go one step further and track these repos, you could
look at git-submodule or git-subtree.

-- 
Cheers,
Ray Chuan
--
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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]