Created
October 14, 2009 13:45
-
-
Save nowhereman/210084 to your computer and use it in GitHub Desktop.
Git - Rewriting a specific commit message in history
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Rewriting a specific commit message in Git history | |
#If you have this message 'Namespace refs/original/ not empty' | |
#Remove the sub folders of your $GIT_REPO_ROOT/.git/refs/original | |
#Replace <commit-id> by your commit id ! | |
git filter-branch --msg-filter ' | |
test $GIT_COMMIT = <commit-id> && echo "My new commit message" || cat | |
' HEAD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment