ignore idea folder and force removal of secrets.py from git history with command:
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch secrets.py' --prune-empty --tag-name-filter cat -- --all

also, assumed file to be unchanged with:
git update-index --assume-unchanged .idea/workspace.xml

 will check after the push...