www/content/blog/commands/git-rewrite-commit-history.md

385 B
Raw Blame History

title date description tags
Rewrite a git commit history 2018-03-05 How to rewrite a git commit history
git

git filter-branch

Here is how to rewrite a git commit history, for example to remove a file : {{< highlight sh >}} git filter-branch index-filter "git rm --cached --ignore-unmatch ${file}" --prune-empty --tag-name-filter cat - -all {{< /highlight >}}