how to add gitignore after commit code example Example: apply gitignore after commit git rm --cached $file