Trying to understand the feedback branch/PR in assignments


When I created my first assignment in GitHub Classroom, I saw that, in addition to the main branch of the original repository, student repositories had a feedback branch. I also saw the automatically-created pull request. It wasn’t clear to me from the instructions how these fit together. Does work that students do in any branch go into the PR or just work that they do in the main branch?

Thank you.


Hey @ellenspertus, when you create an assignment, there is an option to Enable feedback pull requests as show in the snip below. Only if this option is enabled, your student repositories will have a feedback branch.
The students will still have to push their code to the master branch, but the changes that they do will be visible in the Feedback PR. The trainer can then review student’s code and provide proper feedback using PR comments.

1 Like

Thank you. I did enable feedback pull requests, which is how I got the feedback branch and pull request I mentioned.

What I meant to ask was how the student’s commits fit with it. I am familiar with ordinary GitHub workflows. Is the automatically created feedback pull request the same as if the student created the feedback branch and opened a draft PR from the main/master branch, or is it something different?

I also want to know this, because I don’t see what the new branch has to offer other than a way for a careless student to commit somewhere I won’t see it in my normal workflow.

Can we get a video showing the intended usage?

When you enable the Feedback Pull Requests, two things are created: a feedback branch and then the Feedback pull request from the main branch (main, master, etc.) to the feedback branch. See the screenshot below:


Students then push commits to the main branch, and doing so automatically updates the PR with the additional commits. This might be confusing at first because the PR direction is reversed from normal, where you’d be merging into the main branch.

edit: this information is basically the same as what was said above (thanks @TripathyM!), but I’m trying to emphasize the direction of the PR to help resolve some confusion about how it works. If a student pushes to another branch it won’t update the PR.

1 Like

Perhaps this is answered elsewhere… should we as instructors be approving the merge? Should there ever be a merge?

Hi @alvaromonge

Generally, merging or not the PR turns to be irrelevant as the PR itself is merely employed as a dashboard to group up comments, suggestions, and heads-up the teacher may give to the student.

Interestingly, this GHC automation implements what we detailed out in our instructions for collaborative code reviews.

In a context where the assignment is incremental instead, it might be useful to merge the PR in the first place to then let the student proceed further with the second, third step, and so on so forth.

For each step, the student and the teacher may exchange information using PR’s.

Merging or not the intermediate PR’s is a topic discussed in the somewhat related thread below:

Multiple rounds of feedback - #2 by pattacini.

Thanks @pattacini! The reason I asked is because the assignment has multiple checkins/milestones, so I’d like to use the feedback PR not just throughout but specifically for each of these milestones. In milestone 2, I only want to see and review changes made since milestone 1, and so on with other milestones. It seems, merge of the PR is what will do this.

I’d appreciate any other suggestions. Thanks!

You could still stick to a single PR if you mark previous comments as resolved as discussed in the related thread:

© 2017 GitHub, Inc.
with by
GitHub Education