Re: Quick question: how to generate a patch?

From: Linus Torvalds <torvalds@osdl.org>
Date: 2006-02-28 03:04:36
On Mon, 27 Feb 2006, Aubrey wrote:
> 
> I'm a newbie of git. I have a question about how to generate a patch by git.
> I want to make a patch againt git repository HEAD. So in my local
> tree, I do the command:
> 
> git diff -p > my.patch

You don't need the "-p" - it's the default for "git diff".

> The file my.patch is generated. But the unchanged files information is
> also included in the patch file. It should be quiet.

It sounds like your index is not synchronized with your file contents. 
Have you done "touch" on files? Or edited them, and then edited them back?

If so, "git-update-index --refresh" will re-synchronize your index with 
whatever file contents you have.

			Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Feb 28 03:05:14 2006

This archive was generated by hypermail 2.1.8 : 2006-02-28 03:05:28 EST