On Github, I've run across a pull request which it implements a feature I like but feel isn't quite intuitive and could be better. The maintainers of the original repo have so far declined to accept it (or explain why). It was requested 3 months ago so I suspect they won't take it without changes.

I'd like to improve upon this contributor's code but don't know the etiquette: should I fork this fork? Or do I fork the main repo and add the other fork as another upstream source? If the latter, how do ensure credit is given where due? What implications does either option have for pull requests?

EDIT: While I appreciate hearing opinions and did ask about etiquette, I'm more interested in knowing about whether there is any technical or pragmatic reason to fork off the main project and add the creator of the 'cool feature' PR as an upstream versus just forking the branch of the 'cool feature' PR.

Based on jan-hudec's answer I'm inclined to fork main + add new upstream. I suspect it'd be easier to keep my fork up-to-date and not reliant on this other contributor to incorporate upstream changes.


There is no difference between fork from upstream with the other fork as additional source and fork from the other fork with upstream as additional source. And when the pull request is merged upstream, it retains absolutely no information about from where it was merged anyway.

Git has separate "author" and "committer" headers for a commit, but it does not have multiple authors. So the only way to give the credit is giving it in the commit comment. If the project uses the Signed-Off-By pseudo-headers in the commit comment, you definitely have to maintain those.

Plus keep any entries added to AUTHORS file, of course.

For the rest, try to discuss the changes in appropriate channel (many projects that existed before github or are done by people used to it have mailing list and prefer discussing things there)


If you want your own copy of the project you want to modify - fork it. That's why that feature exists.

About giving credit to original authors or the recently forked project authors - look at the license of that project. If it states that you need to keep the credits text file - do so. If there's nothing like that - it's totally up to you weather to or not to mention the original source of that project.

Not the answer you're looking for? Browse other questions tagged or ask your own question.