From: Stephen Kelly <steveire@gmail.com>
To: git@vger.kernel.org
Subject: Re: Additional remote on a local clone. Where do the objects go?
Date: Wed, 01 Sep 2010 13:51:03 +0200 [thread overview]
Message-ID: <i5len7$dpr$1@dough.gmane.org> (raw)
In-Reply-To: AANLkTi=_uP_zFOV_k=cM8TXH16kTPAoPGpNkz+QUSzb-@mail.gmail.com
Tay Ray Chuan wrote:
> Hi,
>
> On Wed, Sep 1, 2010 at 3:12 PM, Stephen Kelly <steveire@gmail.com> 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:
I'm confused. I thought the local clone already used shared objects?
>
> 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
So this will pull from the gitorious remote and store the objects in the
parent git from where they are shared with this local clone?
Which is the better solution between this and git-new-workdir given that
these are permanent branches, not temporary, and I'll want to push and pull
various clones and share the objects. It looks like the git-new-workdir
option creates symlinks, whereas the local clone creates hard links, and
this solution creates a redirect of sorts.
>
> # 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.
>
next prev parent reply other threads:[~2010-09-01 11:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-01 7:12 Additional remote on a local clone. Where do the objects go? Stephen Kelly
2010-09-01 10:32 ` Tay Ray Chuan
2010-09-01 11:51 ` Stephen Kelly [this message]
2010-09-04 14:15 ` Tay Ray Chuan
2010-09-05 23:50 ` Stephen Kelly
2010-09-01 10:34 ` Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='i5len7$dpr$1@dough.gmane.org' \
--to=steveire@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).