From 1a4981a826bb94c478c6f49721396ec03e02649c Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Thu, 11 Mar 2021 19:47:26 +0100 Subject: First big articles reformatting now that I properly understand hugo --- content/blog/commands/git-rewrite-commit-history.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'content/blog/commands/git-rewrite-commit-history.md') 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 >}} - -- cgit v1.2.3