Add in your repo:
- a template of it (
secret_token.rb.template
), - a script able to generate a proper config file
secret_token.rb
based on local data found on the server (like an encrypted file with the secret value ready to be decoded and put in thesecret_token.rb
file)
From there, add a git attribute custom driver:
The script referenced above will be your ‘smudge
‘ script which will, on checkout of the working tree, generate automatically the right file.