Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selecting commits to send in a pull-request

I forked a project on GitHub. Being a pure Java source, I had to adapt it to turn it into an eclipse project before working on it. I made 3 commits to reflect these changes.

I then finished adapting the actual program, and I want to send a pull-request back to the developer requesting these changes.

My commit history is as follows:

  • Commits #1, #3 and #4 are eclipse based and should not be sent.
  • #2, #5, #6, #7 and #8 are source related and should be sent.

How do I send a pull-request omitting #1, #3 and #4?

like image 344
Chris Watts Avatar asked Jul 30 '12 12:07

Chris Watts


People also ask

How do I create a pull request only for a specific commit?

In the "Branch" menu, choose the branch that contains your commits. Above the list of files, click Pull request. Use the base branch dropdown menu to select the branch you'd like to merge your changes into, then use the compare branch drop-down menu to choose the topic branch you made your changes in.

Can you commit to a pull request?

You can commit changes on a pull request branch that was created from a fork of your repository with permission from the pull request creator. You can only make commits on pull request branches that: are opened in a repository that you have push access to and that were created from a fork of that repository.


1 Answers

You should have a separate branch of development for each of these features - "eclipse project" and "feature implementation". Then send a pull request for the "feature implementation" back to the source.

Since you have not done that, you can cut a branch called feature from the point where you cloned and cherry-pick commits 2, 5, 6, 7 and 8. Then send a pull request for this branch.

like image 129
Noufal Ibrahim Avatar answered Sep 20 '22 05:09

Noufal Ibrahim