Subject: Update working copy on push without touching several files

From: Alex Amiryan <[email-masked]>
Date: Tue, 20 Oct 2009 19:43:06 +0500

Hello. I am a web site developer. My team is developing web sites
locally using git. Online versions of websites are maintained with git
too. I need to have working copy of my remote git repository (online
version of the site) updated by git push (which I do locally). The
problem is that I have some files there (like database config) that have
to be different from local ones and they must not be updated on git
push. I have made "git update-index --assume-unchanged
incs/config.db.php" but they are not being updated only when I do "git
pull" remotely. I have used some post-update hooks which I found on the
net, but they all do "git reset --hard HEAD" which restores my config
files. Can you please help me to write post-update hook which updates
remote working copy but doesn't touch my assume-unchanged marked files.

- --
Alex Amiryan