Purpose: remove sensitive or secret-contained files
Steps:
Remove file
Add the file to .gitingore
.gitingore
Permantly remove a file from Git history: git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch <file-name>" HEAD
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch <file-name>" HEAD
Force push to re-write history git push --force.
git push --force
Last updated 11 months ago