I mistakenly named a branch and pushed it to Github, even opened the pull request.
Now I want to rename the branch like this, But if I do, it will delete the old branch and create a new one with the correct name. The issue is, that I don't want the owner of the repo to see that I have deleted a branch. I completely want the branch with the wrong name gone from git history.
Is there any other way I can achieve this? I don't want to lose the code too. Please help me with this, I have searched a lot but couldn't find a related solution to my problem. Thanks