# how to revise other people's code ?

**URL:** <https://forum.djangoproject.com/t/how-to-revise-other-peoples-code/27003>\
**Category:** Django Internals\
**Created:** [January 16, 2024, 10:41am UTC](https://forum.djangoproject.com/t/how-to-revise-other-peoples-code/27003 "2024-01-16T10:41:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![HamaBarhamou](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/hamabarhamou/32/18007_2.png) [@HamaBarhamou](https://forum.djangoproject.com/u/HamaBarhamou)\
**Post date:** [January 16, 2024, 10:41am UTC](https://forum.djangoproject.com/t/how-to-revise-other-peoples-code/27003/1 "2024-01-16T10:41:32Z")

</div>

hi, i want to do a code review. i need to be able to get other people’s code, test it locally and give my observations. What part of the documentation explains this? I think I’ve seen it once, but I can’t find it, and I’ve been looking ever since.  
Can anyone help me? Thank you.

---

<div class="post-metadata">

**Author:** ![carltongibson](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/carltongibson/32/267_2.png) [@carltongibson](https://forum.djangoproject.com/u/carltongibson)\
**Post date:** [January 16, 2024, 11:12am UTC](https://forum.djangoproject.com/t/how-to-revise-other-peoples-code/27003/2 "2024-01-16T11:12:37Z")

</div>

The [handling pull requests](https://docs.djangoproject.com/en/5.0/internals/contributing/committing-code/#handling-pull-requests) section of the contributing docs provide a great git alias for checking out a PR.

> If you find yourself checking out pull requests locally more often, this git alias will be helpful:
> 
> ```
> [alias]
> pr = !sh -c \"git fetch upstream pull/${1}/head:pr/${1} && git checkout pr/${1}\"
> 
> ```
> 
> Add it to your `~/.gitconfig`, and set `upstream` to be `django/django`. Then you can run `git pr ####` to checkout the corresponding pull request.

`upstream` is whatever you named the remote for `django/django`. I always call this `origin` but YMMV

I think the `gh` CLI also offers similar (but I don’t use it).

The slightly longer way is to add the contributors fork as a remote and then checkout the PR branch normally. (If you know the URL you can use that in the a `get fetch` command instead of the `upstream pull/.../head` bit in the command about. The help page for `git fetch` goes into a lot of detail…)

---

<div class="post-metadata">

**Author:** ![HamaBarhamou](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/hamabarhamou/32/18007_2.png) [@HamaBarhamou](https://forum.djangoproject.com/u/HamaBarhamou)\
**Post date:** [January 16, 2024, 11:22am UTC](https://forum.djangoproject.com/t/how-to-revise-other-peoples-code/27003/3 "2024-01-16T11:22:34Z")

</div>

Thanks carltongibson. I don’t know how you manage to find your way around all this documentation so easily.

---

<div class="post-metadata">

**Author:** ![carltongibson](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/carltongibson/32/267_2.png) [@carltongibson](https://forum.djangoproject.com/u/carltongibson)\
**Post date:** [January 16, 2024, 11:24am UTC](https://forum.djangoproject.com/t/how-to-revise-other-peoples-code/27003/4 "2024-01-16T11:24:39Z")

</div>

Lot’s of practice 😅

I know it feels like there’s a lot to begin with.

---

<div class="post-metadata">

**Author:** ![HamaBarhamou](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/hamabarhamou/32/18007_2.png) [@HamaBarhamou](https://forum.djangoproject.com/u/HamaBarhamou)\
**Post date:** [January 16, 2024, 11:28am UTC](https://forum.djangoproject.com/t/how-to-revise-other-peoples-code/27003/5 "2024-01-16T11:28:47Z")

</div>

> Lot’s of practice 😅

yes, i’m gradually noticing it. tomorrow it’ll be our turn to say the same thing to a newcomer 😅
