Education


GitHub Classroom celebrates 3M repos with the launch of Classroom Assistant

Teachers tell us they love using GitHub Classroom for deeper insight into student work.

Classroom makes it easy for teachers to set up their courses on GitHub. The tool automatically creates student repositories, and allows you to track assignments right from your dashboard.

It’s helped teachers at Loyola Marymount, Cal Poly, Rice University, and Johns Hopkins use real-world workflows in their courses. In the words of one teacher: “GitHub Classroom takes the intimidation out of using GitHub for noobs.”

As of this week, students have submitted over three million coding assignments using Classroom.

Thank you, Classroom Assistant

But when you have dozens—or even hundreds—of students’ work to grade, you need a simple way to get every repository into one place. Manually cloning each repository eats up precious hours you could spend with students.

Now you can save time and get right to the code. Classroom Assistant allows you to easily download all the repositories in your course.

Signing in to GitHub to use Classroom Assistant

Downloading assignments in GitHub Classroom Assistant

It’s a cross-platform desktop application, available for Windows, Mac, and Linux. Download 500 student assignments—or more—to your local machine with the click of a button.

Install Classroom Assistant or learn more about Classroom

Level up your school projects with Algolia, GitKraken Glo, Heroku, and JetBrains

GitHub Student Developer Pack welcomes Algolia, GitKraken Glo, Heroku, and JetBrains

New tools added to the GitHub Student Developer Pack will make your projects ship faster, shine with robust features, and help you stand out from the crowd.

These powerful new additions are free with the GitHub Student Developer Pack, so you can start the school year off right:

  • Algolia’s APIs will help you build search functionality in your projects
  • Heroku provides a super-easy cloud platform to get your apps online for the whole world to enjoy
  • JetBrains gives you a suite of IDEs to help you conquer your coding assignments

On top of that, our friends at GitKraken added Glo Boards, their issue and task tracker, to help you stay on top of your school work.

Algolia

Does your app have search functionality? Why not add it with Algolia.

Algolia is a search API that gives developers a complete toolkit for building search into their products—from front end libraries to back end frameworks and API clients. Now that they’re included with the GitHub Student Developer Pack, you’ll get 100,000 records for your index, and one million indexing operations monthly for free (a value of $150 monthly).

Build out discoverability features for your app so your users can find what they’re looking for.

Examples of Algolia Instant Search for e-commerce, media, and tourism

Get Algolia

GitKraken Glo

Keeping track of everything you need to do for class can be a chore, and group projects can be especially challenging. That’s where GitKraken Glo comes in with the easiest way to track tasks from inside the GitKraken Git Client, a browser, mobile apps, or even Atom and VS Code. Glo Boards sync in real-time with GitHub Issues to help visualize your to-do list in a workflow or calendar view. Track individual and team progress, and use @mentions to keep everyone on task.

GitKraken Glo

GitKraken offers these legendary task tracking boards with GitHub Issue sync, free for 1 year (normally $49 yearly) through the GitHub Student Developer Pack.

Get GitKraken Glo

Heroku

If you’re building a web application at a hackathon, Heroku is your new best friend. The cloud-based, platform as a service (PaaS) gives you everything you need to do your best work. This includes a fully-managed runtime environment, coupled with a wide range of tools and built-in services. Build apps with the language or framework of your choice. It’s a great place to practice popular architectural patterns or collaborate with other students. For example, developers use the “review apps” feature to share changes immediately with every commit to GitHub. Because Heroku takes care of DevOps, you can focus on becoming a better developer.

All Heroku applications run in a collection of lightweight Linux containers called dynos. With the GitHub Student Developer Pack, you’ll get a Hobby Dyno to run small projects for up to 2 years (valued at $84 yearly).

Get Heroku

JetBrains

These integrated development environments will change your life. If you’re learning Java, PHP, Ruby, Python, JavaScript, Kotlin, Objective-C, Go, or .NET, you can quickly get started with ease using professional developer tools from JetBrains.

With the GitHub Student Developer Pack, you get a free year-long subscription to all JetBrains desktop tools, including IntelliJ IDEA Ultimate, PyCharm Professional, CLion, and Rider. As long as you remain a student, you’re welcome to renew your Student License for free.

Get JetBrains

Commit to your career as a 2019 summer intern

Apply to be a GitHub Intern

Apply to be a GitHub Intern for Summer 2019

Spend your summer at GitHub HQ, work on real projects, and learn from experienced Hubbers. Internships are 10-week-long paid opportunities in San Francisco during summer 2019. We welcome all students enrolled in a university, community college, associate, or graduate school program. International students are encouraged to apply.

Apply for an internship

“This internship was absolutely amazing…”

Srinjoy from the University of Texas shipped several new features to GitHub Classroom, including a new Electron app. Nothing can beat the general enthusiasm and support of Hubbers, according to him, except maybe the dogs.

All the Hubbers here are super encouraging and are always willing to help with any questions you have. Also having dogs in the office is the best thing ever 🐶

Bex worked on the open source project Probot, a framework for building GitHub Apps, and expanded their network by writing posts for the GitHub Blog, and giving a workshop about GitHub Apps at HQ.

And you can’t beat working at GitHub’s headquarters in San Francisco…

GitHub interns having a wheely good time

Apply for the 2019 Internship Program

Apply directly on our website for 2019 summer internship positions. Or sign up to hear news about future internships.

Join our next class of Campus Experts

It’s been two years since the first cohort of student leaders became GitHub Campus Experts. In that time, more than 100 Campus Experts in 20 countries have made their campuses a better place to learn about technology. As GitHub Interns, they have built tech communities in Africa, organized inclusive conferences, and shipped amazing projects.

GitHub Campus Experts at MLH Hackcon

Now it’s your turn! If you’re a student—age 18 or older—using the Student Developer Pack, you’re eligible to apply for the next class of Campus Experts. Once accepted, you can access the Campus Experts training and develop skills in public speaking, workshop design, and community management. You will also receive training and mentorship from GitHub employees, opportunities to participate in exclusive events, and support to help you grow the developer community at your school.

Apply now

Merge conflicts in the classroom

It’s going to happen one day. One of your students tries to merge one branch into another, and the dreaded error appears:

CONFLICT (content): Merge conflict in filename.ext  
Automatic merge failed; fix conflicts and then commit the result.

When changes in two branches overlap, Git shouts out for a clever human (like you or one of your students) to reconcile the differences. Even if you follow all the best practices of Git—communicate with your collaborators, pull in changes regularly, and make commits that are small, logical chunks—merge conflicts can still happen.

But merge conflicts don’t have to be scary for you or your students! In this post you’ll learn how to help students resolve them.

Why do merge conflicts happen?

There are many situations when a merge conflict can happen—when a student pulls in changes from a repository, after they open a pull request, or when they push changes to another repository (there are other, less common situations too, like unstashing, cherry picking, and rebasing, that won’t be covered here). Let’s look at a few examples:

  • Pulling changes: A student has been working on a group assignment in their local master branch. Meanwhile, another teammate has also made changes to the master branch. When the first student runs git pull to bring in their teammates’ work, they find that they’ve made overlapping changes to the same file.
  • Creating a pull request: A student works on a feature branch that gradually gets out of sync with the master branch. When they open a pull request on GitHub, a message appears, “This branch has conflicts that must be resolved.” That’s GitHub’s way of telling you that the two branches can’t be merged without human intervention.
  • Pushing changes: A student works directly on the master branch, while other development continues on the remote master branch. When the student tries pushing to the remote repository, Git refuses with the error message, “failed to push some refs.” This happens because both the student’s local master branch and the remote master branch have new commits. This means that a merge conflict awaits the student the next time they run git pull.

Each of these situations leads to a merge conflict, but the process for resolving them is similar.

Yours, mine, and ours: resolving merge conflicts

When Git encounters a conflict, it pauses whatever it was doing (like pulling changes) and asks you to resolve the conflict. To help you sort out the situation, Git inserts conflict markers into your files, showing you what your changes are and what your collaborators’ changes are. Conflict markers look like this:

<<<<<<< HEAD
See also: [re docs](https://docs.python.org/3/library/re.html)  
=======
See also [re docs](https://docs.python.org/3/library/re.html)  
>>>>>>> master

In this example, Students Frank and Helen have both modified README.md. Frank’s change has been merged to master while Helen’s changes are on a local topic branch. Helen discovered this when she tried to merge the changes from master into her topic branch.

Helen looks closely at the conflicting line. Both students have made roughly the same change to the file by adding a link, but Frank’s change includes a typo. Helen decides to keep her version (HEAD) and discard Frank’s (master). She does this by deleting Frank’s changes and the conflict markers, like this:

See also: [re docs](https://docs.python.org/3/library/re.html)

When she’s done resolving the conflict, she runs git add README.md to tell Git. Satisfied with her changes, she runs git commit to finish the merge.

Consider another example, however, where Helen and Frank have both changed the same line in different ways. Before either of their changes, the file they’re both working on contains this line:

Don’t forget to run the `linter!`

In this example, Frank has expanded the sentence while Helen has added a filename. Helen pulls in the changes and sees these conflict markers:

<<<<<<< HEAD
Don’t forget to run `linter.sh!`
=======
Don’t forget to run the `linter` for :100: source style!
>>>>>>> master

It doesn’t make much sense to choose one side over the other, so Git offers another option: write a new line that wasn’t in either side’s commit history. Like this:

Don’t forget to run `linter.sh` for :100: source style!

If there are more conflicts, then Git will insert conflict markers for each conflicting chunk it finds. Resolving many conflicts is like resolving one, except there are more conflict markers to tidy up. Walk through them one-by-one to resolve all the conflicts in all of the affected files. When you’re finished, add the files and commit.

Resolving conflicts in pull requests

Sometimes you’ll see a merge conflict in the context of a pull request.

You'll see a notification when merge conflicts happen in a pull request

A conflict in a pull request is like one on the command line. In a pull request, you can discuss with your collaborators how you plan to resolve merge conflicts and revise your branch.

The first option: the pull request author can update their branch. Since pull requests work with branches, you can often resolve a merge conflict by adding one or more commits to the incoming branch. For example, you can merge changes locally (e.g. git merge master) and push the branch with the newly-added merge commit to GitHub.

If it’s a complicated conflict, you can discuss the best approach right from the pull request comments. Alternatively, you can amend your pull request (for example, by rebasing the incoming branch or amending a previous commit). This can be confusing at times, especially if there’s already been discussion in the comments.

Another option is to let the person accepting the pull request resolve the conflict while merging it. You can do this within the web interface using the GitHub editor or with the command line instructions GitHub provides—either way, it’s just like resolving a conflict with Git alone by choosing the resulting lines and removing conflict markers.

Bringing it back to the classroom

Resolving merge conflicts under a deadline might not be the best time for students to learn about them. Deliberately introducing merge conflicts in the classroom can help students when it comes time to handle them on their own. Check out Dr. Mine Çetinkaya-Rundel’s talk in which she shares how she teaches students Git skills, including resolving merge conflicts.

Want to learn even more about helping students understand and resolve merge conflicts? Check out the Campus Advisors learning module #3. This video course will help you learn more about group work, pull requests, and how to get your students comfortable with resolving conflicts.

Do you have an assignment you like to use to teach merge conflicts? Let us know in the GitHub Education Community.

Newer

Changelog

Subscribe

GitHub Universe logo

GitHub Universe

October 16-17 in San Francisco
Get tickets today

Discover new ways to build better

Try Marketplace apps free for 14 days

Learn more