From: Konrád Lőrinczi
I have a live server & a local development server, both Linux.
I develop and have my local repo under Windows.
Both Linux servers are connected to my local repo as remote repos.
My problem is, that local server has some localized content, like config.php.
Local dev server:
One solution would be to add config.php
to .gitignore, but this risks that if I add another config variable to the
server, it will be not merged to the local dev server.
Is there a possibility to add regular expressions to the .gitignore file?
Use a hook script to localize the server content while merge compare is done.
Is that possible to do something similar?
How others do this?
IIRC one suggestion is to have different smudge & clean filters for such files.
This means when you checkout locally you would pass those config files through
a filter which replaces `domain="site.com"` with `domain="site.lc"`.
And vice versa on the way back.
So your commits are always production 'ready' (well at least suitable /
config'd for them).
Do make sure any filters are idempotent (can be applied multiple times without
changing the result beyond the first desired change).
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.