git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Update working copy on push without touching several files

From
AAAlex Amiryan <alex@amiryan.org>
Date
Oct 20, 2009, 14:43 UTC
Message-ID
<4ADDCC7A.8080607@amiryan.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkrdzHMACgkQ1KOfm1RDUTH3eQCgsEy+349Q/BnqLyl+6uQcZ871 lZgAn38ZlB4r5Utdt9PbxH/oCCIU2cjM =2FQ/ -----END PGP SIGNATURE-----

Next: Thomas Rast
Message 1 of 2 in “Update working copy on push without touching several files”
  1. Alex AmiryanOct 20, 2009
  2. Thomas RastOct 20, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.