It is rare that I want to modify the branch name after I submit a pullik on github and get a review.How can I change the branch name without deleting the pullik?
``
There seems to be no command to rename the remote branch directly, so I copied it to another remote branch (remote_new) and removed the remote_old.
git checkout-b local branch name origin/remote_old
git push origin local branch name: remote_new
git push origin:remote_old
`
In this way, Pullik disappears.
git github
As @ksaito said, the same question was asked at https://stackoverflow.com/q/20007578/3090068. As a push operation to the remote on git, as long as there is no renaming of the branch, it is inevitable to delete and create a new branch, and the github seems to have no choice but to close the PR.
The practical solution is to create a new PR, close the old PR, and refer the new and old to the destination and source.
© 2024 OneMinuteCode. All rights reserved.