Let's say you have a typical web app and with a file configuration.whatever. Every developer working on the project will have one version for their dev boxes, there will be a dev, prod and stage versions. How do you deal with this in source control? Not check in this file at all, check it with different names or do something fancy altogether?
A configuration file, often shortened to config file, defines the parameters, options, settings and preferences applied to operating systems (OSes), infrastructure devices and applications in an IT context. Software and hardware devices can be profoundly complex, supporting myriad options and parameters.
Configuration files can be used by users to change settings without the need to recompile applications, programs or operating systems.
Centralized configuration file management enables you to maintain multiple versions of your device configuration files in Junos Space Platform. This helps you recover device configuration files in case of a system failure and maintain consistent configuration across multiple devices.
Show activity on this post. The short answer to your question is Yes. I wouldn't hesitate to recommend Git (or any other version control software) to keep track of configuration files.
What I've done in the past is to have a default config file which is checked in to source control. Then, each developer has their own override config file which is excluded from source control. The app first loads the default, and then if the override file is present, loads that and uses any settings from the override in preference to the default file.
In general, the smaller the override file the better, but it can always contain more settings for a developer with a very non-standard environment.
Configuration is code, and you should version it. We base our configuration files on usernames; in both UNIX/Mac and Windows you can access the user's login name, and as long as these are unique to the project, you are fine. You can even override this in the environment, but you should version control everything.
This also allows you to examine others' configurations, which can help diagnose build and platform issues.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With