This is my understanding that the answer is based on comments:
When you do rebase, the commits on your current branch are “canceled” and then “reloaded”, but they are not actually canceled, they are “remembered” * and reused with new identifiers, for example, if I look in git reflog show FeatureB , I get something like this:
7832f89 FeatureB@ {0} rebase finished: refs/heads/FeatureB onto f4df3 efd3fed FeatureB@ {1} commit: B f3f3d43 FeatureB@ {2} commit: A 2f32fed FeatureB@ {3} branch: Created from HEAD
So, as @Jefromi said, the originals still exist (SHAs from A and B do not do the same thing in reflog as in git log, which correspond to A 'and B').
Similarly, git reflog show FeatureC as follows
32873ef FeatureC@ {0} commit: W 17dafb3 FeatureC@ {1} rebase finished: refs/heads/FeatureC onto 89289fe 893eb78 FeatureC@ {2} commit: Z a78b873 FeatureC@ {3} commit: Y e78b873 FeatureC@ {4} commit: X 378cbe3 FeatureC@ {5} branch: Created from HEAD
Again, the original Z, Y, and X are fixed, still exist
So, the solution to my problem is to create a new FeatureBC branch for the HEAD master (for example), then cherry-select commit FeatureB {2 and 1}, and then FeatureC {4, 3, 2} and (possibly) W:
git checkout master git checkout -b FeaturesBC git cherry-pick f3f3d43 git cherry-pick efd3fed
(It seems to have worked, I had to repeat some of the same mergers, but it was not so bad)
Edit, from Jefromi:
Cherry picking may not have been necessary. You can also simply recreate the branches where the branches were before the reboot:
git branch FeatureB-old efd3fed git branch FeatureC-old 893eb78
Or, if you want to throw away the changed FeatureB and FeatureC position, go back to where they were before:
git branch -f FeatureB efd3fed git branch -f FeatureC 893eb78
Finally, note that if you like, you can use another notation presented in the logs - for example, FeatureC@ {2} instead of 893eb78 . This means "second previous FeatureC position." Be careful to use this immediately after viewing the reflog, though, since as soon as you update the branch again (move it, lock it ...), FeatureC@ {2} instead refer to 17dafb3.
As @Jefromi commented on my question:
You probably created a new branch of the wizard or featureC (called ABC functions, say) and merged them into it, leaving the function branches intact. It’s good to keep an independent history of the various function branches.
<sub> * To be precise, old commit objects are simply left in the repository. They will eventually be truncated, since you do not want a repo full of old ragged commits; this will happen the first time git gc is running, and gc.pruneExpire for at least two weeks (with gc.pruneExpire configured). Sub>