Created
May 3, 2013 08:08
-
-
Save houkanshan/5507848 to your computer and use it in GitHub Desktop.
git-multi-cherry-pick
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 | |
# for git < 1.7.2 | |
# from http://stackoverflow.com/questions/1994463/how-to-cherry-pick-a-range-of-commits-and-merge-into-another-branch/1994491#1994491 | |
if [ -z $1 ]; then | |
echo "Equivalent to running git-cherry-pick on each of the commits in the range specified."; | |
echo ""; | |
echo "Usage: $0 start^..end"; | |
echo ""; | |
exit 1; | |
fi | |
git rev-list --reverse --topo-order $1 | while read rev | |
do | |
git cherry-pick $rev || break | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
缺点是git reflow起来很乱。。。。 还是升级git吧。。。。