From: Junio C Hamano <gitster@pobox.com>
To: James Hancock <james@bookstobrains.com>
Cc: "git\@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Can you git clone -partial? I am looking to make a mobile app and it would be nice to have.
Date: Wed, 01 Oct 2014 10:38:01 -0700 [thread overview]
Message-ID: <xmqqtx3npu6e.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAOHoyPr3E9U3XPEjmrSNkT0okHcRN2H7OKyrt-Ar3WMMDL=4vw@mail.gmail.com> (James Hancock's message of "Thu, 2 Oct 2014 00:51:58 +0800")
James Hancock <james@bookstobrains.com> writes:
> i am thinking about developing an app and I want to integrate it with
> git but I only want to store a portion of the file on disk. It is
> going to be in a mobile enviornment and I want to just get one file or
> a small group of files.
>
> I read that you can clone and then only look at one peice but is it
> possible just to clone one peice? And if not what would it take? Maybe
> this is a feature people would like to have. Just hypothetically, what
> would need to happen?
>
> Either
> git clonepartial /repo /file/or/folder/in/repo
> Or
> Git clone -partial /repo /file/or/folder/in/repo
You keep saying "file", but the thing is, Git does not track file.
It tracks history of collection of files.
What are you trying to achieve, exactly? What does your "app" need
out of that operation? Does it need these selected files with their
history? Or does it only care about the contents of the selected
files at the tip of the 'master' branch of that repository?
I'd imagine that your answer would be the latter, and suspect that
you may want to run "git archive --remote" with a pathspec to limit
what gets grabbed.
next prev parent reply other threads:[~2014-10-01 17:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-01 16:51 Can you git clone -partial? I am looking to make a mobile app and it would be nice to have James Hancock
2014-10-01 17:38 ` Junio C Hamano [this message]
2014-10-01 21:32 ` James Hancock
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=xmqqtx3npu6e.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=james@bookstobrains.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.