Education - page 3

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](  
See also [re docs](  
>>>>>>> master

In this example, Students Frank and Helen have both modified 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](

When she’s done resolving the conflict, she runs git add 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 `!`
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 `` 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.

GitHub Classroom report predicts positive student learning outcomes

As of July 2018, GitHub Education has helped over one million students learn to code. Teachers around the world use version control to help students collaborate on software, participate in open source communities, and automate administrative tasks. But what impact does using GitHub have on students? What do students learn by using GitHub?

Education General Manager @mozzadrella and I wanted to find out how using GitHub in the classroom shapes learning outcomes for the 2018 GitHub Education Classroom Report. We surveyed 8,000 students and teachers who had (and had not) used GitHub in the classroom. This post will give an overview and key takeaways.

Read the full report

Overall, we found that how classrooms used GitHub matters—and that students benefited from using GitHub in the classroom in a few important ways. Compared to students who didn’t use GitHub in their courses, students who did:

  • Felt better prepared for their future careers
  • Learned more about industry tools, collaboration, creating a portfolio, and project management
  • Felt more connected to the developer community
  • Felt a greater sense of belonging both in school and in the software industry
  • Benefited more from teacher feedback received on GitHub

screenshot 2018-08-10 14 37 28

What are learning outcomes?

Think of learning outcomes as goals for students. The education field uses these goals to design curriculum and to assess what students know.

In our survey, we focused on these key areas: preparation for the future, classroom experiences, developing a sense of belonging, feedback, and the experience of learning to use GitHub.

Eight thousand students and teachers responded

We compared answers from respondents who used GitHub and those who did not use GitHub in the classroom. Generally, we looked at what the average respondent reported, so the findings may not apply to every classroom.

Positive learning outcomes

Using GitHub (versus not using GitHub) in programming classes predicted greater positive learning outcomes:

  • Students felt more prepared to take part in the developer community: 31% of students who used GitHub in the classroom and 14% of students who didn’t use GitHub in the classroom felt their course prepared them for being a part of the developer community “very much”.
  • Students felt more prepared for creating a portfolio of their work: 30% of students who used GitHub in the classroom and 15% of students who didn’t use GitHub in the classroom felt their course prepared them for developing a portfolio of their own work “very much”.
  • Students felt they learned more about project management: 25% of students who used GitHub in the classroom and 12% of students who didn’t use GitHub in the classroom felt they had learned “very much” about project management.
  • Students felt they learned more about popular industry tools: 29% of students who used GitHub in the classroom and 14% of students who didn’t use GitHub in the classroom felt they had learned “very much” about popular industry tools.
  • Students felt more prepared for future internships or careers: 33% of students who used GitHub in the classroom and 19% of students who didn’t use GitHub in the classroom felt their course prepared them for future internships or careers “very much”.
  • Students felt they learned more about teamwork and collaboration: 32% of students who used GitHub in the classroom and 17% of students who didn’t use GitHub in the classroom felt they had learned “very much” about teamwork and collaboration.

Sense of belonging

Using GitHub (versus not using GitHub) in programming classes predicted a greater sense of belonging, a variable important to academic success:

  • 51% of students who used GitHub in the classroom and 37% of students who didn’t use GitHub in the classroom agreed or strongly agreed with statements indicating feelings of belonging in the classroom.
  • 48% of students who used GitHub in the classroom and 37% of students who didn’t use GitHub in the classroom agreed or strongly agreed with statements indicating feelings of belonging in the field.


Of the students who used GitHub in the classroom and received teacher feedback, those who received (versus did not receive) feedback via GitHub benefited more from teacher feedback.

Students felt they used their teachers’ feedback more effectively and found the feedback more helpful:

  • 74% of students who received teacher feedback via GitHub and 67% of students who didn’t receive teacher feedback via GitHub agreed or strongly agreed they used the feedback effectively.
  • 75% of students who received teacher feedback via GitHub and 65% of students who didn’t receive teacher feedback via GitHub agreed or strongly agreed the feedback was helpful.

Students felt their teachers were more aware of their needs as a student:

  • 68% of students who received teacher feedback via GitHub and 60% of students who didn’t receive teacher feedback via GitHub agreed or strongly agreed the teacher understood their needs as a student.

Support in learning to use Git and GitHub

Students needed more support from teachers and peers when learning to use GitHub. About a quarter of students felt they received less support than they needed from teachers, and about a third of students felt they received less support than they needed from peers.

Implications for Computer Science education

@mozzadrella, who is also an instructional designer, sees important conclusions in the data around developing a sense of belonging and self-efficacy:

This study offers on-ramps to help more people succeed in Computer Science education. We now know that using GitHub in the classroom predicts a greater sense of belonging, which is related to persistence, overcoming obstacles, and overall academic success.

Feedback is a huge piece of learning, and students say feedback delivered through GitHub is both more effective and more helpful. Better feedback leads to better code. This is an urgent insight that will move the entire education field forward.

The last key insight is about student success: Students who use GitHub in their technical courses report being more prepared for future coursework and for work in industry. This has wide-ranging implications for student engagement in technical education.”

As the school year starts, teachers can use these insights to calibrate for the needs of students. Teachers who are looking for help getting up to speed on GitHub can use the online teacher training in Campus Advisors, or sign up to find out more about GitHub Education.

Thank you, GitHub Education

It was an exciting opportunity to conduct this study. As my background is in psychological research, I’m naturally curious about how different variables shape learning. The big questions we took on challenged me to put myself in the students’ shoes. And as a teacher myself, insight to the challenges students face and how resources may be leveraged to boost positive learning outcomes is incredibly valuable. Thank you to everyone who participated in our research. We look forward to sharing more research findings with you in the future.

Read the full report

How the GitHub Student Developer Pack helped this student get a tech job

Jay Taslim Dosunmu, a computer science student at Perimeter College, Georgia State University, has landed gigs at Stanley Black & Decker, SurveyMonkey, and Georgia Tech.

In 2017, Jay served as tutor for students learning computer science at his school. He wondered to himself, “How can we make online tutoring more efficient, and work for everyone?”

He spent his Thanksgiving break building what would become the Athena Learning Platform. What started as an email system for tutoring sessions, evolved into a platform for students to request tutoring and submit feedback on the process.

Jay had access to premium developer tools through the GitHub Student Developer Pack, which he used to implement his idea. In this post, Jay tells the story of how he made Athena, and how it eventually led to his summer internships.

Athena: a tutoring platform for everyone

Jay says, “My goal was to create a student-centered platform to bridge the gaps between the different learning environments in a school. I found that the students experienced three different contexts, but that information didn’t move between them at all.”

The three different contexts he describes are:

  • Classroom settings where an instructor provides information and assesses students’ performance
  • Tutoring centers in which qualified people help students understand the material given by an instructor
  • Student circles where students work together to learn

“Academic performance would improve if teachers could effortlessly see where students are struggling, and if teachers, students, and tutors could all seamlessly get involved with the learning process together. I wanted to help students move away from just passing a test, and more towards a life-long process of constant learning.”

How it works

Athena works by asking students to sign up, ask questions, or open up a discussion that tutors, teachers, and other students can take part in.

After students submit tutoring requests by filling in some information—the course, their professor, and how they want to receive tutoring help, whether by discussion posts or by face-to-almost-face video tutoring—tutors are notified. From there, tutors and other users on Athena can respond and help.

From there, mentors have the ability to view reports on the interactions happening on the platform. This feature helped my Perimeter College tutoring team generate monthly reports in a few seconds rather than several days, and the insight we gained from the reports was more robust.

Athena tutor request;

Athena tutor feedback;

Athena tutor dashboard;

Figures 1-3: Students can post an image of where they need help, and tutors can respond via their dashboard.

Jay says, “It’s amazing to think how Athena has grown from a side project to software that hundreds of Perimeter College students use each semester. I presented on Athena twice at the Georgia Tutoring Association conference and during semester prep sessions for my school’s tutoring center. I’ve received overwhelmingly positive feedback on Athena after every presentation. It’s very humbling.”

Build an application with tools from the Student Developer Pack

Jay walks through how he built Athena with tools from the Pack:

  • Athena uses SendGrid to send emails to users. Django-sendgrid-v5 makes this pretty straightforward.
  • I set up a static and media server supported by AWS Simple Storage Service (S3). The credits I got from the AWS Educate offering in the Student Developer Pack are still enough to cover the costs I’ve had so far.
  • Most recently, I added Travis CI to Athena’s continuous integration workflow to properly test code changes before making them live.

“The application uses Docker to containerize, or capture, the architectural dependencies of the project to build and run Athena on any computer, allowing the development and production environments to mirror each other,” he says. “I am working on building a ReactJS frontend supported by a REST API. Soon I will ship an improved analytics system to incorporate cutting-edge data science methods.”

Knowledge that prepares you for industry

The Student Developer Pack made it easy for Jay to start experimenting with industry-standard tools while working on projects.

“I found that as I progress through my academic and professional career, the Student Developer Pack is growing with me. After learning about analytics during my data science internship, I feel more comfortable using the analytics tools. And now, having learned about continuous integration and continuous deployment during my co-op at Georgia Tech Research Institute, I feel confident in using TravisCI.”

He has taken that knowledge with him to work; Jay completed his spring Co-op with Georgia Tech’s Research Institute, and is currently a Summer Machine Learning Intern at SurveyMonkey.

Get the Student Developer Pack

Turning today's students into tomorrow's technologists with GitHub Education, a free program for schools

GitHub Education banner image

For years, GitHub has been free to individual students and teachers for classroom use. Now, we’re making it possible for schools of all types and sizes to adopt GitHub and our education offerings in a single bundle through GitHub Education.

GitHub Education includes access to GitHub, an ever-growing suite of developer tools in the Student Developer Pack, workflows for teachers in GitHub Classroom, and training through Campus Experts and Campus Advisors.

Now we are putting all of these tools and programs together—along with free access to our Business Plan and GitHub Enterprise, so your entire school can get on board at no cost.

We’re excited to expand our commitment to include the features that schools need, like SAML single sign-on and access provisioning, with GitHub Education.

A product suite built around students and teachers

In 2014, we launched the Student Developer Pack, a set of the best tools to help students prepare for careers in the industry. By 2015, teachers asked for help managing their courses with GitHub, so we built GitHub Classroom. Teachers have used it in over 10,000 courses, with their students creating more than two million repositories. Since 2016, students have leveled up their leadership skills through Campus Experts. Now hundreds of Campus Experts around the world are working to build strong technical communities. Earlier this year, we opened up teacher training with our new Campus Advisors program, so that instructors can use Git and GitHub in their courses with confidence.

To date, we’ve helped more than one million students around the globe learn to code, and engage with technical communities to take the next step in their careers.

Helping schools amplify their reach and impact

While many schools teach with GitHub because it is the industry standard for collaborating on software, our partner schools see GitHub Education as a vital way to fulfill their own missions.

Kwame Yamgnane, co-founder of coding school 42 Silicon Valley, says, “Our mission is to prepare tomorrow’s workforce, entrepreneurs, and thinkers with skills and a digital toolset for the 21st-century. We want to make education and pathways to the workforce accessible, and GitHub Education is helping us do that globally.”

In Spain, Ubiqum Code Academy is working to reduce high unemployment rates as well as a skills shortage for IT jobs. “We’re reversing this trend,” says Nathan Benjamin, Head of Product. “At Ubiqum students learn to think like coders and analysts, collaborate on project teams, and use the modern tools essential to IT. The most important of these is GitHub.”

Other GitHub Education schools include Gallaudet University, Santa Barbara City College, St. Louis Community College, and the University of New Hampshire.

Bring GitHub Education to your school.

Life as a GitHub Intern: What laser cutting taught me about contribution graphs

Anisha Gupta is a recent graduate from Arizona State University, a Campus Expert, and developer workshop leader at events around the world. She joined the GitHub Developer Marketing team in January as a Developer Relations Intern and will be working through Summer 2018. In this post, Anisha shares how she was able to connect with diverse communities and find inspiration, while working remotely from ASU, by laser cutting contribution graphs.

Students don’t realize how much stuff they get for free—I didn’t until I was three months away from graduation. I’d just started an internship on GitHub’s Developer Relations team when I also discovered my university’s laser cutting lab. I passed by the lab daily but never entered because I didn’t even know what laser cutting was. It didn’t occur to me to try it out until I found the perfect design idea: contribution graphs. My contribution graph tells me what I’ve contributed to, how I contributed, and how often I worked on projects.

After talking to a mentor from the GitHub Team, Katrina Owen, I learned that she works daily on her open source project,, and it takes 100 commits to turn a gray square green on her contribution graph. This was humbling and inspiring to hear as a recent graduate just about to enter the developer industry. That’s when I decided to laser cut @kytrinyx’s contribution graphs from 2013 and 2014 to remind myself of the effort one has to take to reach their goals. What started as something cool to have on my desk is now my source of inspiration as I look ahead to building my skills as a developer.

Getting started with laser cutting

I worked with my school’s lab manager to outline the steps for the laser-cut contribution graph I wanted to create. These are the steps I followed:

  • Take a screenshot of the contribution graph you want to laser cut
  • Use software that’s connected with your laser cutter (in this case, CorelDraw)
  • Import the screenshot and convert it to a grayscale image
  • Adjust the laser cutter’s settings to fit the wood density and thickness
  • Click print



Once I started laser cutting more contribution graphs, including one I gave to Katrina, I set out to work on a project which allowed all GitHub users to create laser-cut contribution graphs. I consulted Ladies Storm Hackathons (LSH), a Facebook group that empowers women to collaborate and go to hackathons together. I got an overwhelming response from members who were excited to be part of the project.

But now I had to screenshot 20 different contribution graphs, adjust their sizes, and put them into one SVG file. My team suggested that I create an application to automate the process, so I set out to build an app that would let me create laser-cut contribution graphs and then place an order for business cards.

Building the application

A first attempt

I started out by reaching out to the GitHub Ecosystem team, and Katrina suggested I look at Puppeteer, a headless Chrome tool that renders and screenshots pages without having to pull up the browser itself. I found a Puppeteer sample on Glitch, which I used as the basis of my application. I dove into testing different methods within Puppeteer and was able to grab screenshots of contribution graphs from GitHub usernames. The few lines of code below show the two core methods that powered the application. It navigated to my profile page and took a screenshot based on the clip parameters I specified:

await page.goto('');
await page.screenshot({path: __dirname+'/public/puppeteer.png', clip: {x: 320, y:630, width:660, height:100}});

However, the clip parameters were too specific. Each user’s contribution graph is placed at a different pixel based on a user’s descriptions and pinned repositories. In short, the application only worked perfectly with my profile.

Try out the application

Refining the app

I pair programmed with John Crepezzi, who introduced me to Ruby and various gems and packages such as Nokogiri, a parser of many file types, and Octokit.rb, a simple way to connect with the GitHub API. Nokogiri parsed the profile page into one HTML file that’s used to grab and filter the GitHub contribution graph into its own variable (and later converts it to an SVG file):

doc = Nokogiri::HTML.parse(contents)
doc.css('.js-calendar-graph-svg > g').first['transform'] = nil
graph = doc.css(".js-calendar-graph-svg").first

For the front and back side of the business cards, the app provides SVG templates and information from the GitHub profile page are used to fill in the name and handle. Octokit collects the profile information based on the username, and it only requires one line to connect to the API: user = Octokit.user(login). The end product is an application which requires only a username to create three SVG files and place them into a folder.

By automating this process, I was able to print out 28 business cards at one time. The 28 in the photo below are a combination of people who have helped me, community members from LSH, and my GitHub Team.


How I feel about contribution graphs now

This project showed me how communities can come together to expand on an individual’s idea to create something larger. Working with contribution graphs helped me find common ground with other GitHub community members. I learned about the projects they worked on and how they came to release, maintain, and make their projects thrive on GitHub. In the past, I was intimidated by profiles with green-filled graphs, but I realized that each person has their own story to tell, no matter what their graph looks like. And there are always opportunities to contribute more.

If you’re interested in expanding the projects you contribute to on GitHub and seeing more of those green squares, here are some resources that have helped me:

If you would like laser cut your own business card or any design you had in mind, find a local makerspace to build things and become a part of a maker community.



Discover new ways to build better

Try Marketplace apps free for 14 days

Learn more