I started using git for my projects, when I create a project, it has a configuration folder containing configuration files:
application/config/config.php application/config/database.php application/config/routes.php
When I first commit, I want these files (with their default values) to be committed, so they exist in the repository as "standard" configurations, and if I clone to the repository, I get these files. When I update them to contain my configuration variables (for the version I'm developing), I do not want them to be updated in the repository, I want them to remain in the default state in the repository.
I tried first to execute them in my default state, and then add them to my .gitignore file, for example:
application/config/*
Now, when I commit my configuration files, they are not executed (yay!), However the initial default values ββdisappear, the application of the / config / folder no longer exists in my repository.
I assume that something obvious is missing here, but I'm very inexperienced with git.
How can I commit configuration files in my first commit, but never again, remaining in the repository in their default state?
source share