My git branches look like this:
master-*-*-*-*-*-*-implement_x
\ \-*-further_foo_fixes_that_depend_on_x
\ \-*-*-further_bar_fixes_that_depend_on_x
\
\-implement_x_rebased
It ended this way, because I thought my branch implement_x
would be merged upstream as it is, but I was asked to squash it to a single commit, thus implement_x_rebased
. However, I already started several branches for further fixing and developing that depend on my work, while waiting for the implement_x
to get merged.
Now I'd like to rebase the further work on implement_x_rebased
. I thought this was a no-op, since implement_x
and implement_x_rebased
were in the exactly same state - there would be no merge conflicts, just applying the changes between implement_x
and further_foo_fixes_that_depend_on_x
etc. on top of implement_x_rebased
. However, it seems that git isn't that smart, and it tries to rebase all the way from the base - introducing needless merge conflicts.
I thought that the easy way out is rebase&squash the further fixes on implement_x
and then stash them, and apply the stashes to implement_x_rebased
, but I'm curious whether there is any proper way to make git realise that implement_x
and implement_x_rebased
are actually in the same state?