'How to update PR from which I deleted the source in GitHub?

I have opened a PR a few weeks ago. I deleted my local stuff. Now I need to update the PR. How can I do this?

  • I took a new fork

  • I checked out the PR (gh pr checkout xxx)

  • I made my changes and commited

  • I wanted to push but I got:

    fatal: The upstream branch of your current branch does not match the name of your current branch. To push to the upstream branch on the remote, use

      git push [email protected]:xx/yyy.git HEAD:refs/pull/111/head
    

    To push to the branch of the same name on the remote, use

      git push [email protected]:xx/yyy.git HEAD
    

But when I try that I get

ERROR: Permission to xx/yyy.git denied to my-user.

I can push the branch to my own fork but then I can only create a new PR? What steps should I follow to update my PR from which I don't have a fork anymore and there is no branch.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source