how to add a file to gitignore after commit code example
Example 1: apply gitignore to current commit
#First commit all changes
git rm -r --cached .
git add .
git commit -m ".gitignore updated"
Example 2: git ignore after commit
git rm --cached /\*.exe
Example 3: how to add filer to git ignore
go to the gitignore file, add the name of the file to ignore