3

We have a repository with about 7000 commits over the years. We would like to use the git repository as a piece of evidence for anteriority in court.

Is there a way to show that older git commits did not change (at least that the author date and commit date) and are somehow what they looks like to be?

It is possible in Git to change an old commit date, but it does invalidate all future hash, so it should reflect in the repo. But once it is done, is it possible to find out that some old commit changed ? And so, if such an evidence is not found, is it possible to prove that there haven't been any massive rewrite of the git history ?

MarcJx
  • 47
  • 1
  • 3
    A commit can per definition not be changed - it will be a new commit and all following commits will also be new commits. https://stackoverflow.com/questions/40512166/how-do-i-know-if-a-git-commit-has-been-changed and no - I don't think you can reliably detect it – fredrik Sep 08 '21 at 09:24
  • 3
    I think if you use some `bfg` repo cleaner tool and then remove all the old cached dangling commits from the remote server it's possible to rewrite the whole history without leaving traces. Yes, hashes will change, but even if there's some local repository that wouldn't `git pull` and still be holding that old history, it wouldn't be an absolute proof of originality – Alexey S. Larionov Sep 08 '21 at 09:35
  • Marc, if someone answers here (doesn't matter what would be the answer — left, right, up, down, yes, no…) and you'd loose in court — who would be responsible? My advice is: do not ask such questions here and do not rely on any answer. Especially on favorable answers. – phd Sep 08 '21 at 09:59
  • 4
    Proving a universal negative is hard. Disproving it needs only one instance. Who has the burden of proof in your case? (i. e. is accusing the other part) If it's them, let them their burden of proof. If it's you, it looks grim. – Romain Valeri Sep 08 '21 at 10:10
  • You must be very careful with stuff in court. You can stipulate to obviously-wrong "facts", such as "the sky is green, grass is orange, and clouds are made of cotton candy" and once you do so, they are now "facts" in that particular case. Lawsuits are won on facts (including any bogus ones like these), law (as interpreted by judges), precedent (previous decisions in any case the judge thinks is sufficiently similar), and other things (depends on bench vs jury trial). – torek Sep 08 '21 at 19:56
  • Thanks for the info. It is clear to me that I do not expect a piece of bulletproof evidence, I am looking for this to be part of a body of evidence and facts. Indeed cleaning the remote repositories it is possible to rewrite the whole history without leaving trace, but in the end the process is not easy (to delete traces everywhere) and this is the information I need. – MarcJx Sep 09 '21 at 10:55

0 Answers0