aboutsummaryrefslogtreecommitdiff
path: root/content/blog/commands/git-rewrite-commit-history.md
diff options
context:
space:
mode:
Diffstat (limited to 'content/blog/commands/git-rewrite-commit-history.md')
-rw-r--r--content/blog/commands/git-rewrite-commit-history.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/content/blog/commands/git-rewrite-commit-history.md b/content/blog/commands/git-rewrite-commit-history.md
index 8378a9c..4176c82 100644
--- a/content/blog/commands/git-rewrite-commit-history.md
+++ b/content/blog/commands/git-rewrite-commit-history.md
@@ -9,6 +9,6 @@ tags:
## git filter-branch
Here is how to rewrite a git commit history, for example to remove a file :
-{{< highlight sh >}}
+```sh
git filter-branch –index-filter "git rm --cached --ignore-unmatch ${file}" --prune-empty --tag-name-filter cat - -all
-{{< /highlight >}}
+```