Wednesday, December 11, 2024

How to remove sensitive data from Git repo

 install git-filter-repo

brew install git-filter-repo
run command :
git filter-repo --invert-paths --path PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA

git remote add origin https://github.com/OWNER/REPOSITORY.git
git push origin --force --all

No comments:

Post a Comment