git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Newbie: Do I need to download the entire repo to work on just 1 file?

From
NSNicolas Sebrecht <nicolas.s-dev@laposte.net>
Date
Mar 22, 2009, 23:31 UTC
Message-ID
<20090322233120.GC12974@vidovic>
In-Reply-To
<fabb9a1e0903221610p3b11f09ctc6a9f4d38b1bda3e@mail.gmail.com>
On Mon, Mar 23, 2009 at 12:10:48AM +0100, Sverre Rabbelier wrote:
Show 8 quoted lines
> 
> Heya,
> 
> On Mon, Mar 23, 2009 at 00:10, Nicolas Sebrecht
> <nicolas.s-dev@laposte.net> wrote:
> > No, you don't. Why not use the '--depth <depth>' option of 'git clone' ?
> 
> That depends on if he wants to push back to the original repo or not, right?

It depends of what the OP means by "entire repository". You can't "cherry-pick" one single file without download the entire tree of the working directory.

You can push with a truncated history. What you can't do is checkout from the history you don't have in your local repository.

-- 
Nicolas Sebrecht
Previous: Geoffrey LeeNext: Nicolas Sebrecht
Message 7 of 8 in “Newbie: Do I need to download the entire repo to work on just 1 file?”
  1. Anthony RasmussenMar 22, 2009
  2. Sverre RabbelierMar 22, 2009
  3. Geoffrey LeeMar 22, 2009
  4. Nicolas SebrechtMar 22, 2009
  5. Sverre RabbelierMar 22, 2009
  6. Geoffrey LeeMar 22, 2009
  7. Nicolas SebrechtMar 22, 2009
  8. Nicolas SebrechtMar 22, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.