Simple script to locally pull a PR from Github without committing it
Add this to your git config (eg ~/.gitconfig)
[alias]
pr = "!php /full/path/to/ozh_git_pr.php"Assuming you want to locally test PR #1337, just do:
git pr 1337This will be equivalent to :
git checkout -b pr-1337
git pull --no-commit https://github.com/SOMEDUDE/SOMEFORK.git SOMEBRANCHIn details:
- creates a new branch named
pr-1337and switch to it - pulls whatever repo/branch has been submitted as the PR on Github
- but does not commit changes, so you still see what files are modified and what's changed in them
Do whatever the hell you want to do with it