I forked project B and made some commits (on master - slap wrists) C. B was originally forked off A, and B had submitted a pull request back to A which was recently accepted.
The git network looks something like this: (black = A, blue = B, purple = C).

I want to be able to clean up my repo and commits C such that I can prepare to submit clean pull requests back to A. How do I do this?
Sounds like a good case for an upstream.
Here is the walk-thru on Github. You'll want to use A as the upstream repo.
Once you have the upstream setup you can merge the upstream repo with your fork by following this walk-thru, then submit your PR.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With