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?