Skip to content

Instantly share code, notes, and snippets.

@soypat
Created July 2, 2025 17:18
Show Gist options
  • Save soypat/a1db1c1dce176ab4ffdc03cd31ca5ffc to your computer and use it in GitHub Desktop.
Save soypat/a1db1c1dce176ab4ffdc03cd31ca5ffc to your computer and use it in GitHub Desktop.
git add remote PR to your repo and work on it or test it.
# Example PR https://github.com/soypat/glay/pull/2
NAME=amken
REMOTE_BRANCH=main # The branch the PR was created on the remote repo.
git remote add $NAME [email protected]:amken3d/glay.git
git fetch $NAME # Get latest branch state.
git checkout $NAME/$REMOTE_BRANCH # pull changes in detached state, we will not track remote
git switch -c $NAME-here # we create a new branch to work on changes, but in our repo.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment