Home > Mobile >  How to make two changes on GitHub go into two separate PRs?
How to make two changes on GitHub go into two separate PRs?

Time:10-26

I saw an open source project on GitHub, and want to made some changes to it.

(Update: and I did it all on the GitHub website, because I needed to use a different account but haven't set up two accounts in Bash on my machine).

So I forked the project, and then made some changes to one file, and then created the PR to the original repo.

It is all fine as I see the PR in the PR list of that repo.

But right now I want to make another change to a different file. So I made the change, and committed, and wanted to create another PR.

The reason is, even if they approve the first PR, they may not approve the second PR, or vice versa, so it is better to keep the two PRs separate.

However, I saw that it automatically went into the first PR, and there was no way in the process to let me make it into a separate PR.

How can it be done? I did it all on GitHub because I haven't set up two different github users on my local machine using Bash. In the past I was able to just do it on GitHub as a different user and create two separate PRs as I recall, but not any more.

CodePudding user response:

The problem is that you put the two commits on the same branch.

You can only have a single PR per source and destination branch pair. If you want to create a second PR, you need to use a different branch name, and then create another PR.

CodePudding user response:

But right now I want to make another change to a different file. So I made the change, and committed, and wanted to create another PR.

You should create a branch for the second change and then create a PR from that branch.

  • Related