A Git repository is a Merkle tree whose canonical “master branch” is agreed upon by everyone and difficult or impossible to change (because people want to collaborate on a project). If you try to rewrite history and people don’t agree with you, they would just fork the project and get on with their day.