I cloned someones github repo, checked out a new branch to isolate changes I was about to make. having modified the code base significantly I realized I should have instead forked the repo and then send out pull request with my changes.
How can I swiftly recover from that as if I were forking the repo from the start?
Fork the repo. This will create a clone on GitHub at your user account.
Change the URL of origin to your fork's URL (instead of the original repo):
git remote set-url origin <fork_url>
Push to origin (your fork), visit your fork's page on GitHub, and there should be a link to compare branches and create Pull Request.
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