Last active
June 8, 2017 13:56
-
-
Save Hiroshiba/b07cd3ea625fd755d13c5dbf510775cd to your computer and use it in GitHub Desktop.
git周りのスニペット
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
# 歴史にcommitAを持つブランチに関して、commitAよりあとのコミットをcommitBに付け替える | |
# for b in `git branch --contains commitA --sort=-committerdate`; do git rebase --onto commitB commitA $b; done | |
function git-rebase-related-branch () { | |
for b in `git branch --contains $1 --sort=committerdate`; do | |
git rebase --onto $2 $1 $b | |
sleep 1s | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment