Skip to content

Instantly share code, notes, and snippets.

@mendhak
Last active July 26, 2023 07:35
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mendhak/d3cafcf2d1a6764f7c2395e37bc05a81 to your computer and use it in GitHub Desktop.
Save mendhak/d3cafcf2d1a6764f7c2395e37bc05a81 to your computer and use it in GitHub Desktop.
Update a pull request by pushing to another user's forked repository

Add the other user as a remote

#Using https
git remote add otheruser https://github.com/otheruser/yourrepo.git
# Or - Using SSH
git remote add otheruser git@github.com:otheruser/yourrepo.git

Fetch

git fetch otheruser

Create a branch from their repo

git checkout -b otheruser-master otheruser/master 

Push to their repo

git push otheruser HEAD:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment