I want to push the changes for the bug fix to one of the PRs..
How do I specify which PR to push to?
That's a bit odd question.
You mentioned two PRs. One of them is merged.
A "merged PR" is not a PR anymore.
Maybe you really meant: How do I specify which branch to push to?
A "merged PR" is nonsense, but you can of course push the source branch of the PR.
You can specify a target branch as usual:
git push origin localbranch:targetbranch
After this, you'll have to create a new PR from targetbranch
, since the old PR is gone.
I found a bug in a merged PR and am about to revert it.
Let's say that the PR was merged into master
.
Here's a clean way to fix the bug:
Create a new branch from master
, and apply your bugfix on it.
Create a new PR into master
No need to overcomplicate this.
I have been on the same master branch instead of using separate branches.
If you want to use this local master
branch of yours,
then rebase on top of the remote master
.