how to add .gitignore file after commit code example
Example 1: apply gitignore after commit
git rm --cached $file
Example 2: how to add filer to git ignore
go to the gitignore file, add the name of the file to ignore
git rm --cached $file
go to the gitignore file, add the name of the file to ignore