I’m using git for a PHP project, I think it’s really handy. There is one thing that would be great if I get it to work.
I have created a branch, meant for deployment. It has some differences, like different configuration files and documentation.
I can’t just ignore them, because then they will stay in both branches, while I would like to keep them different in both branches.
The problem is that when I merge the branches, those files that are meant to be different are merged too.
Is there any convenient way to accomplish such a thing? How is this normally done?
Update Feb. 2021: Git itself is still not a good fit, but GitHub Action environment could help.
2009: I am not sure Git is meant to be used this way.
First a quick Linus advice, always "colorful" and informative 😉
There.
That said, you could:
Other solutions in this thread involve working on a "server-specific" branch on your deployment server