Reputation: 5198
I'm just getting started with Git.
I've got:
/www/my-web-app/
and /www/git-repo/
and then the actual web app /www/production-my-web-app/
.I'm currently pushing from my local machine to the bare repository and then pulling that in the production repository.
The issue is I have a couple of config files that are different in production.
I have them ignored but I can't figure out a way to upload them (can't do it via FTP for some reason) and I'm sure I'm just missing an obvious facility of git.
Any help is appreciated, thanks!
Upvotes: 2
Views: 158
Reputation: 1326782
The feature you might have missed and should help in your case is the "content filter driver", especially the smudge step.
The idea is to version a:
That way, that same smudge script will use external values when used in a production environment, that is secret values not stored in a git repo (no danger for them to be cloned/pushed around).
As opposed to your local machine where those test values can be safely versioned in a Git repo.
If there is no "secret data" issue, you can simply version several "config value" files, one per environment, leaving it to your smudge script to:
git checkout
)Upvotes: 2