I got a pull request on a Github from a fork by someone with an interesting idea. The commit was done on the master of the fork. I would like to "accept" that pull request, but only if I am able to check it before, and perhaps enhance it.
So what I would like to do is:
I have searched a lot in the documentation, but it seems not to be possible. The only way it will work is:
If I just accept and merge the pull request, I get
So how can I reach the following goals: give credit to the originator, be safe in accepting it, have the option to work further on it?
So I give a detailed view after having read the links from @jonrsharpe (thx.).
You have to do the following steps to get the things accepted on a different branch:
gh pr checkout 188
).Now you have locally the branch of the other (if it was a branch), or the commit on the master. In my case, I had the branch already, so now I could do:
If the change in the pull request was on the master, you have now the commit on your local master. There are many good descriptions how to do that, for example this: Move the most recent commit(s) to a new branch with Git
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.