Mark commit as base commit for rebase #3154
-
Hi, there is this |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Just one example out of many: suppose you have two release branches, "main" and "develop". You start a feature branch off of "develop", and then after a while you decide you want to move it to "main" instead. You can't just select main and hit "r", because this would not only rebase the commits of your feature branch, but also all commits between it and main, so the result would not be what you want. In this situation you would select the commit on "develop" that your feature branch forks off of, mark it as the base commit for rebase, and then select main and hit "r". Basically you need it any time you would have used "rebase --onto" on the command line. If you google for that, you'll find many other examples. |
Beta Was this translation helpful? Give feedback.
Just one example out of many: suppose you have two release branches, "main" and "develop". You start a feature branch off of "develop", and then after a while you decide you want to move it to "main" instead. You can't just select main and hit "r", because this would not only rebase the commits of your feature branch, but also all commits between it and main, so the result would not be what you want. In this situation you would select the commit on "develop" that your feature branch forks off of, mark it as the base commit for rebase, and then select main and hit "r".
Basically you need it any time you would have used "rebase --onto" on the command line. If you google for that, you'll fin…