Create dummy file _DO_NOT_COMMIT when not in development target
Edit: Yeah... Wappler is going to need more polishing, this is a mess, even the Publish feature to deploy has a "commit to Git" feature, and I'm guessing it doesn't switch to the Development target before committing...
The way Wappler deals with Git is far from industry-standard. You're likely to start noticing issues when you start working in a team. Wappler's target switching modifies certain files, that are then eligible to be commited, but they shouldn't be commited to avoid file conflicts when several Wapplers are working in different targets, and potentially leaking out database credentials in the Git repository (a Git repository shouldn't have database credentials).
Sorry I'm not being very specific, but this text would get a lot bigger
Basically, the point is, only the Development server target configuration files should be commited. If you switch to Production target, then Wappler writes the DB configuration in a JSON file, and such file is ready to be commited to Git (but it should never be commited).