Created
November 3, 2024 11:27
-
-
Save lanefu/b3ab6d18820886a4ac1cfb6b204ff729 to your computer and use it in GitHub Desktop.
Git checkout pull request from GitHub
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment