0

Is it possible to have files inside the repo so they get cloned. But they should not be pushed?

We have some config files which are needed for our code. But they need changes for every machine.

MuhKuh
  • 356
  • 1
  • 16
  • do you use `.gitignore`? – Aaron_ab Dec 02 '19 at 13:55
  • 2
    The usual approach is to check in template files (let's say `myLocalConfig-template.conf`) and put the actually used file names into `.gitignore` (let's say that's `myLocalConfig.conf`). Then you can either require each developer to copy the template to the actual file manually or automate that via your build tool or even git hooks. – Joachim Sauer Dec 02 '19 at 13:55
  • 1
    https://stackoverflow.com/search?q=%5Bgit%5D+application+config – phd Dec 02 '19 at 14:07
  • @phd git update-index --skip-worktree seems to be exactly what I need, thx. Just one more question: This is only locally, right? So every developer has to do that once when setting up their dev machine? – MuhKuh Dec 02 '19 at 14:55
  • 1
    "*This is only locally, right? So every developer has to do that once*" Yes. – phd Dec 02 '19 at 15:17
  • @phd And you only have to do it once? Or every time you branch? – MuhKuh Dec 02 '19 at 17:19

0 Answers0