RSS

Rewrite a git commit history

Rewrite a git commit history

Here is how to rewrite a git commit history, for example to remove a file :

git filter-branch –index-filter "git rm --cached --ignore-unmatch ${file}" --prune-empty --tag-name-filter cat - -all