I have tried a lot to gitignore wp-config.php on a fresh installation of WordPress, not fresh installation also but none of them has worked. I am using PhpStorm.
Does anyone have an idea?
Please note that I have used rm -- cached and all know solutions.
the commands tested
git rm --cached wp-config.php
add file to .gitignore