Created
April 29, 2022 16:47
-
-
Save chabgood/699c992d2fa6ae73a4e790c5c58aa284 to your computer and use it in GitHub Desktop.
Bash git rebase
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
BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
RELEASE=$(git branch -a | grep -Eo 'release/\d{2}.\d{2}.\d{2}' | tail -n 1) | |
git checkout ${RELEASE} && git pull | |
git checkout ${BRANCH} && git rebase ${RELEASE} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment