0

I'm working with GIT on a development version of my API and I want to push this version into production but some configuration files contain different variables in development and in production. How to keep different files between production and development while using git? Is it possible to exclude many files or folder from merge ? The gitignore is not the solution because it deletes the files from the production server during a pull ...

Rom1906
  • 1
  • 2
  • It's not generally possible to exclude files from merging. See [Git - Ignore files during merge](https://stackoverflow.com/q/15232000/1256452) for some ways to approximate it, but note that none of them are perfect. – torek Jun 03 '20 at 20:11
  • It's probably better to not use git for that - have both configuration in every branch, and have the deployment code pull the right config file. – root Jun 04 '20 at 04:28

0 Answers0