4

My repository: my-repo
Branch name: my-branch
User A: raised PR #123

Now, I checked out PR-123 using git fetch origin pull/123/head:userA-pr and checked out that new branch (userA-pr) to make some changes. Now, how can I push these changes back to PR #123?

halfer
  • 19,824
  • 17
  • 99
  • 186
sekhar
  • 371
  • 2
  • 10

1 Answers1

3

How can I push these changes back to PR #123?

You cannot, since the all idea of a PR is to contribute to a repo you are not the owner of, to which you cannot contribute (push) directly to.

If you need to contribute to another repo (including one from which a PR was done), you need to:

Or you simply make a common branch (here userA-pr) in your repo and invite the other contributor to make PRs against that branch: see "Forking a fork of my repo in GitHub"

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 1
    Note that if their repo is a fork of your repo (or a common upstream repo), there's no need to make another fork -- you can create a PR into their repo from any branch in your repo. – Chris Dodd Apr 08 '17 at 00:53
  • @ChrisDodd Thank you. I have included your comment in the answer for more visibility. – VonC Apr 08 '17 at 05:41