Last active
April 25, 2024 03:56
-
-
Save WanLinLin/982c37a376136acd1da2878ff322e9e6 to your computer and use it in GitHub Desktop.
rebase.sh $target_branch $root_commit_hash
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
cur_branch=$(git branch --show-current) | |
git stash | |
git checkout $1 | |
git pull | |
git checkout $cur_branch | |
git rebase --onto $1 $2 | |
git stash pop stash@\{0\} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment