Skip to content

Instantly share code, notes, and snippets.

@lanefu
Created November 3, 2024 11:27
Show Gist options
  • Select an option

  • Save lanefu/b3ab6d18820886a4ac1cfb6b204ff729 to your computer and use it in GitHub Desktop.

Select an option

Save lanefu/b3ab6d18820886a4ac1cfb6b204ff729 to your computer and use it in GitHub Desktop.

Revisions

  1. lanefu created this gist Nov 3, 2024.
    7 changes: 7 additions & 0 deletions getPR.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    #!/bin/bash

    REMOTE_REPO=origin

    PR=${1}
    git fetch -v ${REMOTE_REPO} +refs/pull/${PR}*:refs/remotes/${REMOTE_REPO}/pull/${PR}*
    git checkout -f ${REMOTE_REPO}/pull/${PR}/merge