.gitignore should be working now [following a stackoverflow answser 1141+]
git rm --cached app/config/ config & database.php. Pray.