Created
April 11, 2016 02:25
-
-
Save tony19/63a84fa4a3129a98c66e9fb0b94d5e9c to your computer and use it in GitHub Desktop.
prefix text to git history
This file contains hidden or 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
# /usr/bin/env bash -e | |
# This uses git-filter-branch to prepend a given string to each commit summary. | |
prefix=:smiley: | |
ref1=HEAD~2 | |
ref2=HEAD | |
git filter-branch -f --msg-filter 'stdin=$(cat) && echo "$prefix $stdin"' $ref1..$ref2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment