git annoyances: how to force git to fetch a particular file

Mike McCormack mike at codeweavers.com
Tue Jul 11 23:55:20 CDT 2006


Dan Kegel wrote:

> Sigh, I guess I'll just have to keep blowing away my git tree every
> few days... shame I'm not smart enough to use 'git fetch' properly.

Well, if you want to do it in a bit of a round about way:

git diff-index -p HEAD > foo.diff
patch -p1 -R < foo.diff
vi foo.diff   #remove bits you don't want
patch -p1 < foo.diff

I find the above useful for getting rid of things like whitespace 
changes or debugging messages I've added when preparing to commit 
something to my tree.

Mike



More information about the wine-devel mailing list