git fetch origin refs/reviewable/pr756/r6 git checkout FETCH_HEAD
Reviewable stores references to commits associated with each revision on Github.
This has a handy side effect of making it easy to checkout a local copy of any revision from any Reviewable pull request.
This can be done in two steps.
- Get a reference to the pull request or revision of interest.
- Checkout or make use of that reference.
If your prId were
756 and your desired revision were
6 as in the image above, you would store revision reference in
.git/FETCH_HEAD constant using
git fetch origin refs/reviewable/pr756/r6
Note that the form of the reviewable reference titles as shown above is
revisionId are available by inspection on the reviewable.io. review page:
You can also just explore the references using the git client, by typing a reference name partially, as in
git fetch origin refs/reviewable/, and then use tab completion to get your options.
After saving the FETCH_HEAD reference as described above, you can use it as you see fit.
For example check out the revision code using
git checkout FETCH_HEAD
or glance at the log using
git log -n 1 --oneline FETCH_HEAD