aboutsummaryrefslogtreecommitdiff
path: root/content/blog/commands/git-rewrite-commit-history.md
diff options
context:
space:
mode:
authorJulien Dessaux2021-03-11 19:47:26 +0100
committerJulien Dessaux2021-03-11 19:47:26 +0100
commit1a4981a826bb94c478c6f49721396ec03e02649c (patch)
treecbd779f6f8e36a28f4d6bd2788c21ce10d9ef122 /content/blog/commands/git-rewrite-commit-history.md
parentSeveral fixes (diff)
downloadwww-1a4981a826bb94c478c6f49721396ec03e02649c.tar.gz
www-1a4981a826bb94c478c6f49721396ec03e02649c.tar.bz2
www-1a4981a826bb94c478c6f49721396ec03e02649c.zip
First big articles reformatting now that I properly understand hugo
Diffstat (limited to 'content/blog/commands/git-rewrite-commit-history.md')
-rw-r--r--content/blog/commands/git-rewrite-commit-history.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/content/blog/commands/git-rewrite-commit-history.md b/content/blog/commands/git-rewrite-commit-history.md
index 6d241ed..8378a9c 100644
--- a/content/blog/commands/git-rewrite-commit-history.md
+++ b/content/blog/commands/git-rewrite-commit-history.md
@@ -1,13 +1,14 @@
---
title: "Rewrite a git commit history"
-linkTitle: "Rewrite a git commit history"
date: 2018-03-05
-description: >
- Rewrite a git commit history
+description: How to rewrite a git commit history
+tags:
+ - 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 >}}
-