Script to checkout any PR for local review
source setup.sh
git-pr-local <pr-number> [<remote> [<new-local-branch> [-f|--force]]]
- remote:
origin
- new-local-branch:
pr/<pr-number>
- Let's assume
origin
points to the central repository, which has the issues and PRs tracker - You want to locally checkout a PR with ID 2018 to a new local branch named
pr-local-checkout-2018
cd <repository_directory>
git-pr-local 2018 origin pr-local-checkout-2018