3 ms·
No rebase tutorial is complete without the --onto option, which lets you essentially transplant a series of commits to a completely different branch. Very usef
by Tade0 4y ago
No rebase tutorial is complete without the --onto option, which lets you essentially transplant a series of commits to a completely different branch.
Very useful when you've created a branch(A) based on another branch(B), which in turn was based on master, but in the meantime master had a few commits added, so while it's trivial to rebase B with master, rebasing A with an updated B won't work.
- b3morales 4y agoThe latest git release has an option to handle this multiple branch scenario for you: `git rebase --update-refs` I don't know why I can't find any announcement of this other than a GitHub blog, but here it is: https://github.blog/2022-10-03-highlights-from-git-2-38/ https://github.blog/2022-10-03-highlights-from-git-2-38/
- bern4444 4y agoIs that effectively the same as cherry picking a bunch of commits at once?