Skip to content

Instantly share code, notes, and snippets.

View obnoxxx's full-sized avatar

Michael Adam obnoxxx

  • IBM
  • Göttingen
  • 16:45 (UTC +01:00)
  • X @obnoxXx
View GitHub Profile
@obnoxxx
obnoxxx / gist:e3dadd6506c693b7e236db4ac73c70cd
Created August 28, 2025 09:33
How to fetch github PRs as branches
By adding one simple line to the config file a github repo's local clone, it is possible to fetch pull requests(PRs) as branches, which can be very convenient for reviewers for local testing of PRs and trying to help solve issues.
conceptually, one adds this line to the section `[ remote "origin"]` og `.git/config` in the checkout dir:
```ini
+refs/pull/*/head:refs/remotes/origin/pr/*
```