Hacker News new | past | comments | ask | show | jobs | submit login

I think that even just on private machines, this would make some types of legal compliance needlessly difficult. If you ever need to delete that data, for example to comply with a corporate retention policy or in response to a request from an individual in a jurisdiction that requires you allow doing so, you would need not just to rewrite history but also to ensure that history is rewritten in every clone that any employee has ever made of that repository; there might not even be a record of which clones exist.



The clone issue is real, but it's no more complicated than it would be without git: Keep track of who has a copy of this data and where. Whatever system you have in place to solve that problem can also be used to manage the cloning process.

As for the individual repos, here's the procedure:

  cd <repo>
  rm -rf .git/  # DON'T TRY THIS AT HOME unless you know what you're doing.
  git add .
  git commit -m "Brand new repo"
Do not do the above unless you completely understand the ramifications. But those ramifications might be precisely the ones you want for legal compliance.


Please never do this -- not least of which because each person who does it will end up with now completely divergent histories and repos from each other.

There are various tools to properly filter history, e.g. `git-filter-repo`, but the short answer is as the grandparent commenter said, things get hairy, you need to rewrite history and coordinate. It's not a situation you should hope to get yourself into...


Might as well not use git then




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: