* Update working copy on push without touching several files
@ 2009-10-20 14:43 Alex Amiryan
2009-10-20 16:45 ` Thomas Rast
0 siblings, 1 reply; 2+ messages in thread
From: Alex Amiryan @ 2009-10-20 14:43 UTC (permalink / raw)
To: git
-----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-----
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Update working copy on push without touching several files
2009-10-20 14:43 Update working copy on push without touching several files Alex Amiryan
@ 2009-10-20 16:45 ` Thomas Rast
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Rast @ 2009-10-20 16:45 UTC (permalink / raw)
To: Alex Amiryan; +Cc: git
Alex Amiryan wrote:
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-20 16:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-20 14:43 Update working copy on push without touching several files Alex Amiryan
2009-10-20 16:45 ` Thomas Rast
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).