Question

I've forked a project on GIT, and started contributing. From what I've understood, that project has a pending pull request at the time I cloned the project, and later that commit of a 3rd person was refused by the project owner.

I've done my change (adding a single new file), and I wanted to push it to the master branch of the project. So I've pushed it to my github master branch, and then I wanted to make a pull request.

In case I'm not clear, I've done this:

  • Clone the project
  • add a file & commit
  • push my changes to my github branch
  • wanted to make a pull-request. (but didn't yet)

In the pull request, I've 2 commits ( but I've only made 1 ):

  • Mine ( the most recent )
  • The refused pull request of another person.

So I only want to make a pull request for my commit, and remove the previous commit or do something to avoid me having that problem every time.

Note1; I use the SmartGit client, but if the instructions are clear and well explained, I don't mind using the shell client too.

Note2; I've not created any branch yet.

Thanks !

Was it helpful?

Solution

Since you haven't answered the question in my comment, I'll just take an informed guess. The only reason I can think of that the third party's commit would appear as part of your pull request to the upstream developer is if you created your commit on top of the third party's commit rather than on the last commit of the upstream master.

You can check this by looking at git log or from GitHub's commit list. My guess would be that either you cloned from the third party's repository, or had pulled in his / her changes before creating your commit.

OTHER TIPS

I'm dealing with the same issue on github right now, trying to remove some commits from a pull request. So far, all I can see to do is to close the pull request, and issue another one, this time in a branch off of the original repository's master branch, with only the commit you want to submit the pull request for, in that branch.

The other person's pull request which was directed to the original repository should disappear if you go to your repository's Pull Requests tab and simply close the request.

See github's help pages for more information on pull requests.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top