Reputation: 768
I want to have an isolated copy of code and a separate test database to do testing on. I understand the process is roughly:
It's the third step that I'm having trouble with. If I just do a search and replace, then git thinks the file has changed and wants to check in the changes. I obviously don't want to check that change in, but I would also prefer not to have to remove that file every time I'm doing a commit. Alternately, I know that I instruct git to ignore the file, but I want the file to be in source control.
I know that this is a solved problem, but I'm not sure what the best practice is.
Upvotes: 0
Views: 24
Reputation: 10315
If you have files like these, you can commit the file with a dummy connection string and then add the file to your .gitignore. At that point you do have the file checked in, but isn't tracked anymore when changes are made.
Upvotes: 2