Bill Broderick Bill Broderick - 1 year ago 93
Git Question

Unable to open pull request from fork

I'm using Github to work on a project with a collaborator and we each have our own version of the project: I created mine by forking his. Several weeks ago, I finished with a set of changes, merged that branch with my master, and opened a pull request with my collaborator's master branch, which he accepted.

Today, I finished another set of changes, merged the branch with them into my master, and am unable to open a pull request with my collaborator's master branch. We can't figure out why.

Since I created the fork, he's made several changes, which I've merged into my fork by adding his repository as a remote and pulling from that. The project started as private and both of us recently made our branches public.

Does anyone have any idea why I cannot open a pull request? I think it might have something to do with the fact that he had already merged a pull request from my master branch, and Github wants me to open pull requests from different branches instead of from my master, but it seems strange to me that I can't find any way to open a pull request.

We were also thinking I could just create a new fork and copy over my commit history, if nothing else works.

To clarify what I mean by I'm unable to open a pull request, I've attached some screenshots. From each version of the project, I can't find the other fork. It's as if the two were completely separate projects and not forks of each other. In both screen shots, notice how it says there are 0 forks, even though mine was created from his.

enter image description here

From my fork, I can't select my collaborator's as the base fork (or as the head fork, for that matter).

enter image description here

From his, I can't select mine as the head fork (or as the base fork, for that matter).

Answer Source

After reaching out to GitHub support, like Koraktor suggested, they pointed me to this page, which clarifies that making a private repository public will detachany private forks. So that's what happened to us. Unfortunately, they couldn't reattach the two, but I can create a new fork and push all my existing changes to it.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download