Subject: RE:

From: "Bevan Watkiss" <[email-masked]>
Date: Thu, 7 May 2009 13:26:29 -0400

It's the looking for local changes I'm trying to avoid.  Doing a reset still
goes over the tree, which isn't helpful.

Basically I have a copy of my tree where only git can write to it, so I know
the files are right.  The NAS box I have the tree on is slow, so reading the
tree adds about 10 minutes to the process when I only want to update a few
files.

-----Original Message-----
From: Alex Riesen [mailto:[email-masked]] 
Sent: May 7, 2009 1:14 PM
To: Bevan Watkiss
Cc: [email-masked]
Subject: Re:

2009/5/7 Bevan Watkiss <[email-masked]>:
> I am trying to create a working tree for people to read from and have it
> update from a bare repository regularly.  Right now I am using git-pull to
> fetch the changes, but it’s running slow due to the size of my repo and
the
> speed of the hardware as it seems to be checking the working tree for any
> changes.
>
> Is there a way to make the pull ignore the local working tree and only
look
> at files that are changed in the change sets being pulled?

Assuming you didn't modify that directory you pull into,
git pull will do almost exactly what you described. Almost,
because the operation (the merge) will involve looking for local
changes (committed and not).

It should be faster to do something like this:

  git fetch && git reset --hard origin/master

Again, assuming the directory supposed to be read-only.
Otherwise, you have to merge (i.e. git pull).