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

Re: Apply git bundle to source tree?

From
AGAndreas Grünbacher <andreas.gruenbacher@gmail.com>
Date
Sep 18, 2020, 14:12 UTC
Message-ID
<CAHpGcML=EFRngwjgaXNE53OOPoEBz+4Qi1v354gAv_vHNYS_gQ@mail.gmail.com>
In-Reply-To
<20200918140236.GA1602321@nand.local>
Hi Taylor,
Am Fr., 18. Sept. 2020 um 16:02 Uhr schrieb Taylor Blau <me@ttaylorr.com>:
Show 27 quoted lines
>
> Hi Andreas,
>
> On Fri, Sep 18, 2020 at 01:13:52PM +0200, Andreas Grünbacher wrote:
> > Hi,
> >
> > I'm wondering if there's a way to apply a particular head in a bundle
> > to a source tree, for example:
> >
> >   $ git bundle create v5.9-rc1.bundle v5.8..v5.9-rc1
> >   $ cd linux-5.8
> >   $ git bundle APPLY ../5.9-rc1.bundle v5.9-rc1
>
> Sort of. You can specify a refspec when fetching from the bundle to
> fetch only the objects you care about, like:
>
>   cd linux-5.8
>   git fetch /path/to/bundle 'refs/tags/v5.9-rc1:refs/tags/v5.9-rc1'
>
> (or if you prefer, "git fetch /path/to/bundle 'tag v5.9-rc1'"). Then
> once you have the objects locally, you can merge it into your HEAD. You
> can do all of that in one step with:
>
>   git pull /path/to/bundle 'refs/tags/v5.9-rc1'
>
> There's no such thing as 'git bundle apply' though, although I suspect
> 'git pull' is what you wanted anyway.

I was actually looking for a way to apply a bundle to an actual source tree, not a git repository. Fetching stuff from a bundle into a repository seems to be reasonably well documented.

Thanks, Andreas

Previous: Taylor BlauNext: Taylor Blau
Message 3 of 14 in “Apply git bundle to source tree?”
  1. Andreas GrünbacherSep 18, 2020
  2. Taylor BlauSep 18, 2020
  3. Andreas GrünbacherSep 18, 2020
  4. Taylor BlauSep 18, 2020
  5. Andreas GrünbacherSep 18, 2020
  6. Andreas SchwabSep 18, 2020
  7. Andreas GrünbacherSep 18, 2020
  8. Andreas SchwabSep 18, 2020
  9. Junio C HamanoSep 18, 2020
  10. Andreas GrünbacherSep 18, 2020
  11. Konstantin RyabitsevSep 18, 2020
  12. Andreas GrünbacherSep 18, 2020
  13. Thomas Guyot-SionnestSep 19, 2020
  14. brian m. carlsonSep 19, 2020

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.