Last active
August 4, 2022 08:26
-
-
Save alexander-schranz/d03f7459690adc59583fa289a82ebbbb to your computer and use it in GitHub Desktop.
Rebase a pull request to a previous version
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
| # clone repository | |
| git clone git@github.com:your-name/sulu.git | |
| cd sulu | |
| # checkout your branch | |
| git fetch origin | |
| git checkout your-branch | |
| # add target remote | |
| git remote add sulu git@github.com:sulu/sulu.git | |
| git fetch sulu | |
| # rebase from 2.5 to 2.4 | |
| git rebase -i sulu/2.5 --onto sulu/2.4 | |
| # force push your changes as we did rewrite the git history | |
| git push origin your-branch --force | |
| # change target branch in pull request | |
| # if the ci is not triggered after the target branch change do: | |
| git commit --amend --date="now" | |
| git push origin your-branch --force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment