The hashes will sum to something. To do it, at least as far as I understand, you'd have to use https://git-scm.com/docs/git-filter-branch . This will create a divergent history and the new master branch or any other branches that exists will have to be forced pushed. As far as "but local copies of the repo will have the 'problem files' still" - Yes they would. All parties would have to be notified of the legal request.
I'm not a copyright expert but it seems like enforcing this is another step in the erosion of fair use. Something about transformative works. The problem was transformed into a solution.
On the other hand hackerrank's terms of service should have banned this activity. I would imagine it does. I'm not sure how much leverage that gets them legally though. I suppose once you intend to publish it you're no longer an authorized user, and then you're violating that https://en.wikipedia.org/wiki/Computer_Fraud_and_Abuse_Act we see get applied harshly from time to time.
No, that's not how it works. (Finding a hash collission for an existing hash would be a preimage attack, and that's not possible for SHA1 with computing power available to humans.)
... Or even against MD5, IIRC, which is why you are still kind of able to use HMAC-MD5. You probably still shouldn’t, but I don’t know of any other symmetric authenticator that is as short and requires neither vast tables of constants nor 64-bit operations for an implementation. (For all the recent lightweight crypto work, the only cipher I can reasonably see myself implementing on an oldish ATMega without disgust is the NSA’s Speck, with all the accompanying caveats, and there isn’t a single hash of a comparable complexity at all.)
I never wrote shattered is a preimage attack. What I wrote is exactly correct. There are multiple preimage attacks, neither of which I referenced.
A first preimage is where one searches for h(m1)=h(m2). A second preimage attack is where, given m1, find m2 such that h(m1)=h(m2).
It's best not to give the incorrect impression when discussing something exact. As with any crypto, the construction is either valid or not, but it is actually the use of the construction that determines real world correctness.
For example, if SHA-1 is used over input where there is known data in specific positions, that is quite different to SHA-1 over unknown data. In pratice, the first is often the case.
I'm not a copyright expert but it seems like enforcing this is another step in the erosion of fair use. Something about transformative works. The problem was transformed into a solution.
On the other hand hackerrank's terms of service should have banned this activity. I would imagine it does. I'm not sure how much leverage that gets them legally though. I suppose once you intend to publish it you're no longer an authorized user, and then you're violating that https://en.wikipedia.org/wiki/Computer_Fraud_and_Abuse_Act we see get applied harshly from time to time.