4

I made two changes on a project in GitHub (two commits). How can I create two different pull requests from my changes?

I only found a way to create one big pull request that includes all my changes: https://github.com/tcatm/ffmap-d3/pull/22

3
  • I know that in the desktop GUI for GitHub, you can select which files to commit. This way you could select some files, make a pull request, then select the rest, and make another pull request. I have done this on the Mac OSX version of GitHub (I cannot be sure if it is do-able on the Windows version) Commented Jun 21, 2013 at 5:00
  • 1
    I thought of that, but I already committed both changes. I missed to create a pull request before committing the second changes. Do I have to revert the second commit, create the first pull request and then re-commit hte second changes? Commented Jun 21, 2013 at 5:36
  • Yes, I think that may be the solution Commented Jun 21, 2013 at 18:40

3 Answers 3

2

Create a new branch:

git checkout master git checkout -b mybranch ... make changes ... git add myfile git commit git push -u origin mybranch 

Then create a pull request and change the last compare button on github to mybranch

Sign up to request clarification or add additional context in comments.

Comments

1

You can easily solve this with the SmartGit/hg GUI:

  • open the log of the master branch
  • right-click on the first revision from the time, you forked the main project and create a new branch from there
  • switch into that branch in the left bottom corner with right-click
  • cherry-pick the revisions you want to make a separate pull request and commit them as one commit
  • push your new branch up on GitHub
  • there you can create a pull request from just that branch

for the second pull request, you create a new branch and do the same with it

Comments

0

Here are some screenshots taken from the Mac OSX version of the GitHub desktop program.

Here I am making the first commit, but you can see both changes have been made prior to the commit: Commit #1

Here I am making the second commit: Commit #2

Here you can see that each commit was accepted individually: Overview

  • Note: Some names have been blanked out for privacy.

Assuming that the Windows version of GitHub has the same options, I would download the desktop program and try that.

2 Comments

Is this what you wanted? Or am I confused?
no, I clarified it in a comment to the main question. By the way: (not really unfortunately) I use only Linux, and there seems no gitHub GUI yet

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.