diff options
Diffstat (limited to '')
-rw-r--r-- | content/blog/commands/git-rewrite-commit-history.md | 9 |
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 >}} - |