Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github downstream pull request?

I have a project up on github, which an organization on github has forked. Can i push my code downstream to the organization's fork? I tried doing it, but was not able to.

I would like to know if i can send a pull request downstream?

like image 948
Vipin Parakkat Avatar asked Feb 01 '12 15:02

Vipin Parakkat


People also ask

Is forking the same as branching?

Forking creates a full copy of your repository, whereas branching only adds a branch to your exiting tree. The file size of branch can vary depending on the branch that you are on. Under the hood git readily accesses the different files and commits depending on what branch you are using.

What is fetch upstream in GitHub?

Fetch the branches and their respective commits from the upstream repository. Commits to BRANCHNAME will be stored in the local branch upstream/BRANCHNAME . $ git fetch upstream > remote: Counting objects: 75, done. > remote: Compressing objects: 100% (53/53), done. >


2 Answers

GitHub does allow this, and it's actually pretty easy to do, although I didn't find it very clearly-documented.

The short of it, is that when you navigate on Pull Requests > New Pull Request from the GitHub UI, you get taken to the "Compare" page. In the drop down to the left you can select your own branches, OR you can type in a branch on another user's repo (including downstream, or peers) in the form "username:branchname". So (using names from GitHub's examples) if user hubot wanted to submit a Pull Request to downstream user octocat, they would enter "octocat:master" on the left and keep "hubot:master" on the right.

Once the names on the left and right are entered, you'll be presented with the option to "Click here to create a pull request from this comparison." Voila! Downstream pull request!

like image 180
killscreen Avatar answered Oct 20 '22 15:10

killscreen


You can fork their fork of your repository and add that in as another remote on your repo. Then you can send a pull request to them.h You may need to add another user and add a different .ssh/config entry to provide a different public key. Sounds cool! :)

like image 37
Adam Dymitruk Avatar answered Oct 20 '22 14:10

Adam Dymitruk