Is it possible to submit a pull request if I originally cloned a repo locally rather than using the GitHub "fork" functionality??
The scenario is that I have created a local clone of a repository and made some changes. I would like to submit these back via pull request. I can create a repo on GitHub and push my changes there. Once I do that, will I be able to use the "new pull request" functionality, or will GitHub be unable to recognise that the repo is equivalent to a fork?
Best Answer
It doesn't matter when you create the fork because of the distributed nature of git, but github needs a fork in order to make the association necessary to create a pull request, and it also lets people searching your profile more easily make the association back to the original project. Without the fork, you break a lot of very helpful links.
In my local workspace, I usually like to set up one remote called
upstream
to more easily pull from the original, then haveorigin
point to my fork. After you create a fork, you can use the instructions here to change yourorigin
remote url, then just push to there like normal. That way you won't lose any of your existing history.