From: Taylor Blau Date: Fri, 18 Sep 2020 14:02:36 GMT Subject: Re: Apply git bundle to source tree? Message-ID: <20200918140236.GA1602321@nand.local> In-Reply-To: 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. Thanks, Taylor