# Update index with a pickaxed diff

2 messages from 2010-12-29 to 2010-12-29. Participants: Jeenu V, Thomas Rast.
Thread: https://gitlist.dev/t/26153

## Jeenu V, 2010-12-29 11:33

Subject: Update index with a pickaxed diff
Message-ID: <AANLkTi=BJ-8FaN+rk6_74mgM0PVzVP5uhV3aO1A3jUS3@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTi%3DBJ-8FaN%2Brk6_74mgM0PVzVP5uhV3aO1A3jUS3%40mail.gmail.com

```
I'd like to know if there's a quick way of updating the index with the
output of 'git diff -S<expr>'. I find this useful if the change set
that I wanted to include results from, for example, a mass identifier
renaming. That would be easier, especially when my working directory
is already dirty with other changes, and I don't have to interactively
filter out change sets, other than those matching <expr>.

Thanks.

-- 
Jeenu

```

## Thomas Rast, 2010-12-29 13:54

Subject: Re: Update index with a pickaxed diff
Message-ID: <201012291454.52160.trast@student.ethz.ch>
URL: https://gitlist.dev/e/201012291454.52160.trast%40student.ethz.ch
In-Reply-To: <AANLkTi=BJ-8FaN+rk6_74mgM0PVzVP5uhV3aO1A3jUS3@mail.gmail.com>

```
Jeenu V wrote:
> I'd like to know if there's a quick way of updating the index with the
> output of 'git diff -S<expr>'.

git diff <whatever> | git apply --cached

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

```
