# Seeking git recipe to grab a single file

2 messages from 2006-12-06 to 2006-12-06. Participants: Mitch Bradley, Alex Riesen.
Thread: https://gitlist.dev/t/43664

## Mitch Bradley, 2006-12-06 21:22

Subject: Seeking git recipe to grab a single file
Message-ID: <4577348E.4090105@firmworks.com>
URL: https://gitlist.dev/e/4577348E.4090105%40firmworks.com

```
I want to grab a single file from a remote git repository into the 
current directory, which is not a git tree.  Is there an easy way to do 
that?  I have tried using git-fetch and git-cat-file, without success.

Thanks,
Mitch Bradley

```

## Alex Riesen, 2006-12-06 21:51

Subject: Re: Seeking git recipe to grab a single file
Message-ID: <81b0412b0612061351v16aa6b94q8dce9404a5b2675a@mail.gmail.com>
URL: https://gitlist.dev/e/81b0412b0612061351v16aa6b94q8dce9404a5b2675a%40mail.gmail.com
In-Reply-To: <4577348E.4090105@firmworks.com>

```
On 12/6/06, Mitch Bradley <wmb@firmworks.com> wrote:
> I want to grab a single file from a remote git repository into the
> current directory, which is not a git tree.  Is there an easy way to do
> that?  I have tried using git-fetch and git-cat-file, without success.

If the remote repo has a gitweb interface than it's simple:
wget 'http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;h=0451f69353bad4d07de34fd4658f40b805bd467a;f=Kbuild'

Otherwise, there is no simple way to do it yet.

```
