Created
November 5, 2024 10:18
-
-
Save gurunars/488cbb2aba4ba42004d96e9ace666ec7 to your computer and use it in GitHub Desktop.
Rebase feature branch
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
FEATURE_BRANCH=fill-me | |
echo "Backup feature branch to server" | |
git checkout ${FEATURE_BRANCH} | |
git push origin ${FEATURE_BRANCH} | |
echo "Refresh main" | |
git checkout main | |
git pull origin main | |
echo "Rebase feature branch" | |
git checkout ${FEATURE_BRANCH} | |
git rebase main | |
# If there are any conflicts, resolve them and run `git add .` and `git rebase --continue` | |
echo "Push to rebased branch to server" | |
git push origin ${FEATURE_BRANCH} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment