1

Let's say I have a specific file structure:

├─root
│ ├─.git
│ │ ├─...
│ ├─config
│ │ ├─secret.keys
│ │ ├─secret.keys.template
│ │ ├─ ...
│ ├─...
│

I store sensitive data in root/config/secret.keys, and the data is formatted in a specific way. I have a template of root/config/secret.keys in root/config/secret.keys.template which contains the specific formatting in secret.keys, without any of the sensitive data.

Is there a way to automatically replace the data in secret.keys with the data in secret.keys.template in a git push, (obviously without actually replacing my copy of the data permanently)? If not, what's the standard way to approach this problem?

Steven
  • 1,709
  • 3
  • 17
  • 27
  • 1
    You want a hook? – iBug Sep 15 '18 at 10:25
  • Possible duplicate of [How can I track system-specific config files in a repo/project?](https://stackoverflow.com/questions/2154948/how-can-i-track-system-specific-config-files-in-a-repo-project) – phd Sep 15 '18 at 14:38

0 Answers0