Skip to main content

Pushing Updates to a PR

This is unashamedly a "note to self" post... something I occasionally need to do, and always need to ask about or look-up. As a maintainer of an open-source project on GitHub, an incoming PR from a contributor's fork that needs some minor changes before merging can be dealt with by committing changes directly to the branch on the fork, if the contributor has allowed edits from maintainers.

To checkout the branch locally:

git fetch origin pull/[pr id]/head:[branch name]
git checkout [branch name

After making changes, to push them back to the branch on the fork:

git remote add [remote name] addremote [fork url]
git push [remote name] [branch name]

Comments