Closed orbeckst closed 4 years ago
I am currently looking into why this error occurs but a work-around is the following: run the following command once
git pull --allow-unrelated-histories https://github.com/ASU-CompMethodsPhysics-PHY494/PHY494-assignments-skeleton.git master
and afterwards bash ./scripts/update.sh
will work as it should.
(One possibility is that for this year we are using the template functionality to have the private repos created by Classroom – maybe that makes the histories diverge?)
Just tried to create my test folder following the above instructions. I got:
$ bash update.sh
Adding remote repository 'skeleton'.
updating repository... git pull from skeleton
remote: Enumerating objects: 45, done.
remote: Counting objects: 100% (45/45), done.
remote: Compressing objects: 100% (34/34), done.
remote: Total 65 (delta 16), reused 35 (delta 11), pack-reused 20
Unpacking objects: 100% (65/65), 522.76 KiB | 964.00 KiB/s, done.
From https://github.com/ASU-CompMethodsPhysics-PHY494/PHY494-assignments-skeleton
* branch master -> FETCH_HEAD
* [new branch] master -> skeleton/master
creating subdirectories (if any are missing)
created assignment_01/Grade
created assignment_01/Submission
created assignment_01/Work
created assignment_02/Grade
created assignment_02/Submission
created assignment_02/Work
created assignment_03/Grade
created assignment_03/Work
Seems fine. I created the repo directly not from the Classroom.
Students cannot create repositories in the GitHub org, they must use Classroom.
But your comment is useful because it suggests that there is a problem with the fork/template approach in Classroom and my assumption that they get a clone with a common history.
Idea: change update.sh
to do the git pull --allow-unrelated-histories
the first time round (or if git pull
fails)
If you followed the instructions to clone your private homework repository and ran the command
and you don't see assignment03 then look carefully at the output: If it looks like the following
you may note the lines warning: no common commits and fatal: refusing to merge unrelated histories . These are serious issues that result in you not getting the assignment that is available in the skeleton repository.