Created
August 22, 2015 01:40
-
-
Save crash7/3cd6e3e497b16db4587b to your computer and use it in GitHub Desktop.
Rewrite git message for specifics commits
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
git filter-branch -f --msg-filter ' | |
read commit | |
declare -A commits_replaces; | |
commits_replaces["<commit hash>"]="new message" | |
if [[ ${commits_replaces[$GIT_COMMIT]} ]]; then | |
echo ${commits_replaces[$GIT_COMMIT]}; | |
else | |
echo $commit | |
fi' -- --all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment