It was rather an awkward moment when I showed my students my new GitHub Classroom assignment. I ‘accepted’ the assignment link, cloned the ‘student’ repo, worked, and started to create a pull request to a branch I’d created a week prior on the master repo. GitHub told me that “the commit histories are entirely different.” Opening the Git GUI, my branch did indeed seem to be completely disconnected. Huh?
I think this may have been due to ‘enable feedback’ on my classroom repository. Can someone confirm?
@ADWolfe-LoyNO Hmm strange! Are you able to reproduce this in a public assignment repo that we can take a look at? It’s a bit tricky to debug this without a little more information.
This is a change to the template feature we use that went out recently. It seems the API endpoint automatically pulls all branches, we don’t have much say in that. Is it possible for you to work around this?
I can work around it. My main worry was that I had broken something and that I might break it again in the future.
I was using branches (in a different GH classroom) for the exact same purpose as ‘feedback’ so as long as I have ‘feedback’ I’m good.
I’ve lost the link on the feedback feature, however, can you post it for me so I can be sure to use it correctly?
I’m looking deeper and I think there is an issue with template repositories in Classroom. It seems that when a template repository is instantiated, even though the branches are all there, they lose their ‘history’. Oddly the file comparisons still show up correctly, but the student cannot create a pull request because, again “the commit histories are completely different.”
It seems to me that template repositories were conceived as not having branches, and the implementation of ‘instantiate with all branches’ doesn’t really do it right. If you can’t create pull requests or merges, the branches are useless to include in the repository.