Pull request of only one file?

Days ago I forked a repo with a Jekyll website so I could set up my GitHub Pages project, and since then I’ve been working on adding contents. However, now I found a bug in the forked repo and would like to contribute a fix, but I don’t want my whole website to be pushed to the project owner, only my file with the fix. Is there a way to do so?

Thanks.

3 Likes

Hi @patr1c1a,

Thanks for being part of the GitHub Community Forum! I’ll do my best to help here.

You can certainly achieve what you’re asking! What you’ll need to do is create a branch on your fork from the point where your fork and the upstream repo match. Then, you add the single change on that branch and submit a PR using that branch.

@lee-dohm has created a diagram to help visualize this:

I hope this helps! Let us know if you have further questions. 

1 Like