I think French laws have been on website that’s like that for a while
https://www.legifrance.gouv.fr/
If you go on particular laws, you can see the previous versions and how it changed. Example: https://www.legifrance.gouv.fr/codes/section_lc/LEGITEXT0000...
Click on "version" then "comparer" buttons and you will see a diff.
The German parliament even has an official git repository: https://github.com/bundestag/gesetze
Looks like it's been abandoned, though. :(