how to diagnose in commit git code example
Example: apply gitignore to current commit
#First commit all changes
git rm -r --cached .
git add .
git commit -m ".gitignore updated"
#First commit all changes
git rm -r --cached .
git add .
git commit -m ".gitignore updated"