timpone
timpone

Reputation: 19969

how to make 2 pull requests from a single branch before the first has been merged on github

I'm using github and have a dev-ja branch and have made a Pull Request comparing master to dev-ja.

Say I just changed Gemfile.lock in that first commit.

That worked fine. Normally, that has gotten merged in but that was a very small PR and would like to create a second one that is just another commit.

When I look at that commit, I see the changes in Gemfile.lock even if I specify only the most recent commit to dev-ja. In github, how can I specify only to include the most recent commit? Or does it not really matter?

Upvotes: 0

Views: 40

Answers (1)

Jeff Puckett
Jeff Puckett

Reputation: 40861

You can't specify to only include the most recent commit because it will necessarily have the history - which is kinda the point of a version control system.

If you commit to the same branch, then your pull request will be automatically updated.

You could checkout a new branch from before the gem file change and then cherry pick the most recent commit thereby skipping the gem file commit, then open a new pull request from that branch. But I don't think it matters that much in this case, but that's how you could do it, but you'd have diverged branches that would inevitably have to be merged or rebased later anyway.

Upvotes: 1

Related Questions