There is a replication spec which checks for possible ordering issues of migrations. You can find a detailed explanation of that spec and the reasoning for it here. This spec requires setup in the form of
rake test:replication:setup uses a shallow fetch of the current stable branch to determine the list of migrations in that release. We chose to use a shallow fetch to speed up the spec, that way we didn’t have to get the whole history when running the test setup.
This had the unfortunate side-effect of turning the local repo into a “shallow checkout” which can cause some difficulty when trying to properly backport changes.
To fix this situation simply run
git fetch --unshallow and your branches should be back to normal.
git fetch --unshallow returns:
fatal: --unshallow on a complete repository does not make sense
then you’re fine and haven’t hit the issue.
Sorry for any issues that may have caused you.