MakeCode + GitHub

Does anyone use GitHub classrooms for students to collaborate on code?

I created a group assignment in GitHub Classroom using MakeCode Arcade. Students created teams today and were trying to practice pushing & pulling changes.

However, when one group member pushed, they got merge errors, and then it wouldn’t let them go back to their blocks, saying there were issues with the code. Some were able to get to Javascript, but then it wouldn’t convert the code into blocks. Some couldn’t get back to their code at all. This happened with several groups.

Do they have to take turns pushing and pulling? Why won’t it merge the changes? This is my first time using github, sorry if this is a dumb question.

@jacqueline.russell @ketheredge do you have any tips?

Not a dumb question at all! Are these open repos? Could you point me to the project where you’re getting errors? Also, how many different students do you have working on 1 project together?

I know this was cross posted on GitHub, but I thought I would reply here as well for teachers who may only look here.

I have struggled to get the MakeCode Github merge work. I thought it was my school’s filter that was causing the problems, so we just moved on to collaborating in other ways. I never had time to figure out if it was just our filter or something else. Because I could not get this to work, my students do pair programming for smaller collaborative projects, and they copy and paste code for larger collaborative projects.

I hate that my reply isn’t helpful in offering a solution. I would be curious if others who have had issues with the push/pull changes have school filters that are causing the problem, or if there is something else going on.

Generally 2 students, there’s one group in each of my two sections that has 3 students.
It’s several projects & several students.
Here’s one example of a student repo with some pull requests that have merge errors:

In theory this should work - not sure if there’s something going on when they check in changes in Blocks and then in JavaScript.

I’ve logged this as a bug and will have the engineering team take a look: Merge errors in GitHub when collaborating on a project · Issue #5587 · microsoft/pxt-arcade

They’re only really working in blocks. When they click the GitHub button at the bottom of the Arcade editor, it triggers the pxt.json file to change and simultaneously have

    "preferredEditor": "tsprj"
    "preferredEditor": "blocksprj"

on the same line (even though the student NEVER put it into javascript on their own

From researching the past couple days, here’s what I’ve found:
GitHub won’t merge if both people have made edits to the same line of code.
“Lines” of code are hard to conceptualize when working with blocks.
When both students are working in the same event handler (like “on start”) it essentially has them writing on the same “lines” of code.

I’ve tried having students push to branches instead of pushing to the master, and then going to github to make a pull request and merge, which sometimes works. Some students have still been getting merge errors.

Today’s workaround I told them was to publish their branch to essentially make a fresh copy on MakeCode, then try to push & merge their changes in their branch, and if it breaks it, at least their code and sprites are safe (many have been losing them, as the only way to get out of the merge conflict has been to revert their changes or go back to a previous commit version).

My TEALS volunteer pointed out that a lot of the time the merge error has to do with the .png files that are created, so he’s trying to write a script that ignores that file in the merge.

Hi @kroznai - we think we have a fix for this issue. Could you try it out here:

Please let us know if this solves some of the merge conflict errors you were seeing, or if the problem still persists.

Thanks for your patience!

1 Like