Is there some specific Git or Linux tool for such task?
I mean is there some use case for what other developers are using?

What hooks should I use forth & back?

2015.05.16. 22:03 ezt írta ("Philip Oakley" <>):

>   *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.
> Example difference:
> Live server:
> domain=""
> Local dev server:
> domain=""
> 1)
> 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?
> 2)
> 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?
> Thanks,
> Konrad
> --
> 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=""`  with `domain="
> 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).
> Philip

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

Reply via email to