How to use pull requests in the classroom

So you’ve given an assignment to your students in GitHub Classroom, either individually or in groups. But have you given a thought to how your students will work in a way that you can give them useful and instructive feedback?

One approach is linear: students make one commit a time on a single, master branch. In GitHub, teachers can give feedback on a sequential history by commenting on individual commits: view a diff, hover over any line, then click + to start commenting.

Commenting

For students and teachers alike, this is a straightforward approach, but it’s a little limited. It doesn’t mirror the workflow software development teams use outside the classroom. And what if we want to work collaboratively, in a way that fits with the branch, commit, and merge tools that Git gives us? Then that’s where pull requests come in.

Pull requests build on the branching model of Git. A pull request is GitHub’s way of organizing the merging of two branches, whether it’s within a repository or in between forks. Pull requests make space for collaboration and conversation during the development process. In this post, we’ll walk through setting up a pull request workflow for submitting student exercises and leaving feedback.

Pull requests for individual exercises

By starting with pull requests, even for individual assignments, students can develop the skills and collaboration mindset that will help them when it’s time to work with others on a team. Pull requests allow students to experiment and document their processes and let educators give feedback on their progress. It works a bit like this:

  1. The student clones their assignment repository to their local machine.
  2. They start a new branch to work on solving a problem.
  3. They work on their branch by committing their changes as they go, leaving a trail descriptive commit messages.
  4. When they’re ready, the student opens a pull request. In the pull request message, they can describe what problem they’re solving, how they’re thinking about it, and why it’s a good solution.
  5. The teacher responds to the pull request by:
    • Adding to the threaded discussion
    • Leaving line-by-line comments on the diff
    • Making a pull request review that combines an overview comment with contextual commentary

Compared to comments on commits, a pull request is a great place for discussion. Authors and reviewers can comment on specific lines, leave Markdown-formatted messages, or give emoji reactions 👍⭐. The student can even push new commits to the to-be-merged branch, amending the original pull request.

When the student and teacher are happy with the result, they can press the big green Merge pull request button, bringing the changes into the master branch (or another development branch). After a successful merge, you can tidy up by deleting the dangling branch with a one click.

Pull requests for group exercises

For group assignments, pull requests become an especially important tool for coordinating the work of many. In a collaborative workflow, pull requests open up new ways for educators to understand their students’ development. It works like this:

  1. Each student clones the repository to their local machine and starts a unique branch to work on their part of the assignment.
  2. The students work on their branches, committing changes and pushing their branch to the shared repository.
  3. When each student finishes their part of the assignment, they start a pull request.
  4. The students work together to review the proposed changes, discuss improvements or alternatives, and resolve conflicting changes arising from concurrent development.
  5. When the students agree on a resolution, they merge each pull request.
  6. After the assignment, the teacher leaves additional feedback in the pull requests.

As in individual assignments, pull requests give teachers the chance to peek into their students’ process. The repository’s own Insights tab can give a big-picture view of the students’ work, such as the number of open and merged PRs, frequency of commits, or who has contributed to the repository. A closer look at the pull requests themselves can show the team dynamic: how quickly students respond to PRs, what they say in comments to each other, and how they resolve conflicts.

Insights

Groups’ pull requests become a great place for teachers to give feedback, continuing the students’ conversations. Want to bring something to a specific student’s attention? An @mention—the @ symbol followed by a username—notifies the student directly. You can even comment on merged and closed pull requests, just like you would an open one.

Whether your students are working individually or in groups, pull requests are a great way for them to sharpen their workflow and for educators to guide their students. To learn more about using pull requests to work collaboratively, check out the Campus Advisors training module 3—it goes in depth on pull requests, resolving conflicts, and more—or scope out the GitHub Glossary to refresh your collaboration vocabulary. If you’re having any trouble wrapping your head around all this, check out how other teachers are learning about pull requests in the GitHub Education Community.

P.S. Have you been building up your assignment repositories over several semesters?

If so, chances are you have a pretty lengthy commit history by now. Here’s a workflow, inspired by Dr. Diosino, that gives students a clean commit history so they won’t be distracted by your past activity. Here’s how to do it:

  1. Create a new repository. This one will be the pristine copy that your students will see.
  2. Clone the new repository to your computer.
  3. In your clone, pull the changes from the long-lived **repository. Run git pull **
  4. Squash (abbreviate, in Git parlance) the history. Run git rebase –root –interactive and follow the instructions Git gives you to collapse many commits into one previous commit.
  5. Push the new, abbreviated history to your new repository. Run git push origin.

Updated GitHub Privacy Statement and Terms of Service are in effect

Last month, we let you know of some updates to our Privacy Statement and Terms of Service and asked for help from our community. Thanks to everyone who commented and contributed feedback in our Site Policy repository, the updated Privacy Statement, Terms of Service, and Corporate Terms of Service are now in effect!

The updates

What this means for you

Updates to our Privacy Statement and Terms of Service are in effect as of today, May 25. You can accept them by continuing to use GitHub. Again, thank you so much to our user community for helping us improve our terms. Please let us know if you have any questions about the updates.

GitHub collaborates on how to promote human rights at RightsCon

RightsCon—an annual conference on human rights in the digital age—brought together more than 2,000 people from 115 countries last week in Toronto. On the first day of the conference, we joined non-profits, academics, and other tech companies for a session on working together to protect and promote human rights.

Alongside conversations on bias in artificial intelligence (AI) decision-making and cybersecurity capacity-building, we led the discussion on working with our community to develop the policies that govern the use of our site. In the face of public discourse on who should be deciding what speech is legal—and who should be held accountable for these decisions—we provided this example of how a platform can adopt rules through a transparent, democratic process.

At the session, we also highlighted several other ways in which our policy work promotes human rights, like freedom of expression and privacy. Some examples:

Free expression

To promote freedom of expression, we limit censorship by making sure requestors meet our detailed requirements for takedown requests and by limiting the impact of the takedown when possible. For example, we geo-block content that isn’t illegal in all jurisdictions and, when possible, ask users to remove parts of a repository that contain infringing content, rather than blocking an entire repository. In addition, we promote the right of access to information (related to the right to free expression) and transparency by publishing transparency reports and posting takedown notices in real time in our government-takedowns and DMCA repositories. We also described there (and at another RightsCon session) our work on the global implications of the EU’s copyright proposal on free expression.

In our submission to United Nations Special Rapporteur David Kaye’s upcoming report on content moderation and free expression, we note that our approach is consistent with international human rights law. As many speakers at RightsCon pointed out, those international standards are useful for companies looking for a baseline for evaluation that applies to users globally, without imposing one country’s norms on countless others.

Privacy

Millions of developers trust us with their data—and protecting their privacy is a top priority for us. We didn’t need to change the way we handle user data to comply with the EU’s General Data Privacy Regulation (GDPR), which recognizes data protection as a fundamental right. We are proudly in compliance with the GDPR ahead of the law’s deadline this Friday.

Anti-slavery and child labor

GitHub’s Statement Against Modern Slavery and Child Labor outlines the steps we take to make sure modern slavery and child labor are not in our business or supply chain. RightsCon participants were interested to hear how companies that aren’t typically associated with these abuses are taking steps to show how they prevent them, including by placing requirements on their suppliers.

Beyond these examples, a human rights perspective runs through much of our work, such as immigration, open source, net neutrality, and cybersecurity. Hopefully, this illustrates how important it is for tech companies to consider the human rights implications of so much of what we do.

Coming off the heels of an invigorating week of learning and collaborating at RightsCon, we look forward to continuing our work to keep the internet free, open, and secure, and to protect human rights.

Announcing GitHub Desktop 1.2

GitHub Desktop 1.2

A fresh release of our Electron-based Desktop app is here! GitHub Desktop 1.2 ships with new features and enhancements that help you stay up-to-date with your coworkers’ changes and keep you in sync with your team.

Compare branches

Now you can compare your branch to any other branch in the repository, like your master or base branch, and merge that work into your current branch—and there’s more to come.

Multi-file select

In previous versions of GitHub Desktop, you could either perform actions, like discarding changes, on one file at a time or all files at once. Now you can select multiple files to perform an action on by holding down Shift or Command/Ctrl and clicking on the files you want selected.

Community involvement

GitHub Desktop is open source. Thanks to our community, we’ve merged 26 contributions from 18 different contributors. Since launching 1.1 in February, we’ve fixed bugs, improved existing features, and extended GitHub Desktop. In fact, our multi-file select feature started as a pull request from our community :heart:. We’d love to have you join us and contribute to future versions of Desktop.

Check out our release notes to learn more.

GitHub Marketplace celebrates one year

40377173-1e04bc3e-5da5-11e8-8ea0-fc4e7e8e019a

One year ago, we released GitHub Marketplace—a new way to promote, share, and sell the developer tools you built on GitHub. Our goal was to create a single destination for our community to discover the apps and services they need without setting up multiple accounts or payment methods. We launched with 14 select integrators. Today, Marketplace serves more than 100,000 users and offers almost 50 tools. Many of you look to GitHub Marketplace as a place to start to building a business, and we’re making it easier for you to do that with each new feature.

Year in review

Growing our ecosystem

From Travis CI to BackHub and Microsoft, exciting new partners are coming to GitHub Marketplace all the time. To make building apps simpler and help businesses grow, we’ve added features like analytics, product placement, and account support. We’ve also improved our onboarding processes and tools, reducing the time to get listed from two months to two weeks.

As a result, Marketplace apps can gain traction fast. For example, Dependabot saw a 10x increase in signups the month they listed their app.

“We built our business on GitHub because it sits at the heart of developers’ workflows—and that’s where we think project management, or any developer tool, should live, too. It’s great to see that GitHub supports its ecosystem partners the same way it does developers in general, with lots of freedom to move work forward. We’re glad to be a key partner in bringing project management close to the code, and we’re excited to see how GitHub will invest in its ecosystem and Marketplace in the months and years to come.” — Matt Butler, ZenHub

Building an integrated product

The Marketplace API is coming out of preview, and over the last year, we’ve worked to bring functionality that was built natively into GitHub Marketplace to other areas of the GitHub platform. For example, you can now add GitHub Marketplace apps directly to a repository as you create it.

New features for integrators

Free apps

If you want to get listed and currently don’t offer a paid product, you can now list your app on Marketplace as a completely free service available to more than 30 million developers on our platform. Free apps make GitHub even more flexible and provide developers with more ways to build on their workflows.

Insights

Whether you’re a team of one or 1,000 developers, knowing how people use your software can help you create a better user experience. We’ve made it easier to get insight into your app’s performance with new data views and visualizations that show you how many people visited your Marketplace landing page, track the impact of your marketing campaigns, and more.

Self-serve onboarding

After seeing a queue of promising apps waiting to join Marketplace, we’ve taken steps to simplify the process. Now partners can quickly get their app onboard and learn everything they need to know to get set up.

“We’re proud to be part of GitHub Marketplace and believe it’s a critical avenue for growth and success for all products in the developer ecosystem space. There is no better platform than GitHub for growth, collaboration, and brand equity. As GitHub continues to concentrate on its ecosystem and GitHub Marketplace, we look forward to enhancing our partnership.” — Josh Kalderimis, Travis CI

Marketplace trials

With the launch of free trials, developers can try your app free for 14 days to make sure they’re choosing the right tool for their team. Over half of the listings in Marketplace support free trials–and we found that supporting a free trial can increase your revenue by 43 percent. In addition, apps that offer free trials now account for more than 60 percent of our revenue on Marketplace.

One year is just the beginning, and we can’t wait to see what you build next. Check out the newest apps on Marketplace or build your own today.

Newer

Changelog

Subscribe

Discover new ways to build better

Try Marketplace apps free for 14 days

Learn more