From: Avery Pennarun <apenwarr@gmail.com>
To: Asger Ottar Alstrup <asger@area9.dk>
Cc: git@vger.kernel.org, Alexander Gavrilov <angavrilov@gmail.com>
Subject: Re: git subtree as a solution to partial cloning?
Date: Mon, 25 May 2009 03:59:12 -0400 [thread overview]
Message-ID: <32541b130905250059n7b31cc1bk688e5f4bfaf83142@mail.gmail.com> (raw)
In-Reply-To: <8873ae500905250021p20e7096dwf5bc71c36c4047b@mail.gmail.com>
On Mon, May 25, 2009 at 3:21 AM, Asger Ottar Alstrup <asger@area9.dk> wrote:
> I am considering different ways to get git to handle repositories with very
> big files in a setup where partial clone is required, and it seems git
> subtree might be a part of the solution.
Well, that wasn't really what it was originally made for... but perhaps.
> Does git subtree support splitting at the file level, or only at directory
> level?
Currently only at the directory level. In theory, there's nothing
stopping us from working with any subset of files... but it's really
much simpler this way (both to code and to explain) so I'd much rather
leave it as is. Can you reorganize your tree so that you divide the
needed files into different subdirectories?
> Also, how are conflicts handled when you subtree merge changes back
> to the master?
'git subtree split' generates a new commit history on top of the *most
recently merged* commit from the subproject. To merge back into the
subproject, you would take that newly-generated commit and do the
usual "git merge". (ie. you'll have to check out the branch and merge
it as usual)
Alternatively, you could 'git subtree pull' the subproject first,
resolve the conflicts there, and 'git subtree split' after that; in
such a case, the newly-generated commit would be a fast-forward from
the original subproject's HEAD, so it would be okay to push right away
without switching branches first.
(Someone else suggested that we add a 'git subtree push' command to
make the split-then-push sequence nice and obvious; I think that's a
good idea and pretty easy.)
> Can the
> reduced split repositories reuse pack files from the original repository?
Yes, all the tree and blob objects are identical between the two
repositories (except that the superproject has more of them, of
course).
Have fun,
Avery
next parent reply other threads:[~2009-05-25 7:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <8873ae500905250021p20e7096dwf5bc71c36c4047b@mail.gmail.com>
2009-05-25 7:59 ` Avery Pennarun [this message]
2009-05-25 9:33 ` git subtree as a solution to partial cloning? Asger Ottar Alstrup
2009-05-25 15:50 ` Avery Pennarun
2009-05-25 17:35 ` Asger Ottar Alstrup
2009-05-25 17:54 ` Avery Pennarun
2009-05-25 18:28 ` Asger Ottar Alstrup
2009-05-25 19:18 ` Avery Pennarun
2009-05-25 23:26 ` Jakub Narebski
2009-05-25 7:35 Asger Ottar Alstrup
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=32541b130905250059n7b31cc1bk688e5f4bfaf83142@mail.gmail.com \
--to=apenwarr@gmail.com \
--cc=angavrilov@gmail.com \
--cc=asger@area9.dk \
--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).