1 2 3 | git filter-branch --force --index-filter \ "git rm --cached --ignore-unmatch <path to your file>" \ --prune-empty --tag-name-filter cat -- --all |
-r
flag if you want to remove the whole directory.
REF: https://docs.github.com/.../removing-sensitive-data-from...
This error may subsequently follow:
fatal: refusing to merge unrelated histories
Then
and resolve conflicts.
1 | git pull origin the-remote-branch --allow-unrelated-histories |
No comments:
Post a Comment