We have development branch, from which feature branches emerge. Some features are big enough they becomes a topic branches. These topic branches then have more sub-branches that are merged into topic branch and after all topic is finished, then it is merged to development.
Now, I started feature branch from topic branch, but I should have started from development. How can I rebase this?
\ / \
sub-feature U feature W`
You can make a
git rebase --committer-date-is-author-date --onto dev T4 W`
That will replay any commit after
T4, up to and including
W HEAD, onto the
W1'--W2'--W3' (W) / A--B--C--D--E--F--G (dev) \ topic T1----------T2--T3--T4--T5 \ / U1--U2--U3 sub-feature U
See "git rebase without changing commit timestamps", as a workaround to keep a sensible commit date.
But any rebase will always change the metadata.