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

Re: Update working copy on push without touching several files

From
Thomas Rast <trast@student.ethz.ch>
Date
Oct 20, 2009, 16:45 UTC
Message-ID
<200910201846.00650.trast@student.ethz.ch>
In-Reply-To
<4ADDCC7A.8080607@amiryan.org>
Alex Amiryan wrote:
Show 6 quoted lines
> 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.

My best results so far were with special config branches that are auto-merged in post-receive. As a simple example, post-receive might simply be

  #!/bin/sh
  git checkout -f master^0
  git merge config
-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Alex Amiryan
Message 2 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.