Re: How to exclude files from "git diff"
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Jan 5, 2010, 18:31 UTC
- Message-ID
- <fcaeb9bf1001051031j6723dc14v8d43944e3b8baa90@mail.gmail.com>
- In-Reply-To
- <6dc9ffc81001051015x3bebc994r3d475bdb59e12d39@mail.gmail.com>
On 1/6/10, H.J. Lu <hjl.tools@gmail.com> wrote:
Show 14 quoted lines
> On Tue, Jan 5, 2010 at 9:54 AM, Dmitry Potapov <dpotapov@gmail.com> wrote: > > On Tue, Jan 5, 2010 at 5:20 PM, H.J. Lu <hjl.tools@gmail.com> wrote: > >> > >> Yes, I want those files in repository. They are for my personal use only. > > > > If you modified some file locally and do not want to see and commit > > those modifications, you may want to use: > > > > git update-index --assume-unchanged foo > > > > > I added those files into my repository for bookkeeping purpose. It > shouldn't go out at all.
That could be a way to simulate git diff --exclude="foo*.bar*":
git ls-files -- 'foo*bar*'|xargs git update-index --assume-unchanged git diff git ls-files -- 'foo*bar*'|xargs git update-index --no-assume-unchanged
assume that you don't use assume-unchanged for any other purposes
-- Duy