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

Re: Apply git bundle to source tree?

From
Taylor Blau <me@ttaylorr.com>
Date
Sep 18, 2020, 14:02 UTC
Message-ID
<20200918140236.GA1602321@nand.local>
In-Reply-To
<CAHpGcMJqmUmCR_u3fxSVppzwBo8_6RJG5-WLrXAWXm+OQ6_3bA@mail.gmail.com>
Hi Andreas,
On Fri, Sep 18, 2020 at 01:13:52PM +0200, Andreas Grünbacher wrote:
Show 8 quoted lines
> 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.

Thanks, Taylor

Previous: Andreas GrünbacherNext: Andreas Grünbacher
Message 2 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.