git filter-branch --force --index-filter "git rm --cached --ignore-unmatch ${full path to your file}" --prune-empty --tag-name-filter cat -- --alland push the changes to remote branch . Now all the history related to this file will be deleted . Post Comments and Suggestions !!
Computing Magazine
Problem :
If you have a connection config file , where you have your admin password or other sensitive information . If you commit this file accidently in git , it will show in the history , even if you remove it later . To Complete remove the committed file from git , you need to run this command