I am reading "The Art of Immutable Architecture by Michael L. Perry". It says:
Commits are immutable, and contain references to related commits.
..
This results in an immutable graph of commits.
..
When a conflict occurs, as it often does in source code, the developer finds within their local repository all of the information necessary to resolve it.
Based on all of this information, the developer can resolve the conflict themselves. They don’t need to involve the server. In fact, because of the nature of Git branches, they can choose to let the conflict stand as long as they please. There is no immediate need to for the conflict to be resolved before work can continue. But when a resolution is made, it is recorded as another commit. That commit becomes part of the history so that all parties involved can see that the conflict has been resolved and understand the effect of this resolution.
This mode of working is only possible because every commit is immutable.
I am not understanding what he is trying to imply? My confusion stems from the fact that history can be rewritten in git. As, far I know, we will still be able to merge conflict in git repository if history was rewritten.
I have checked What is the benefit of purely functional data structure?. What I understood is one reason for immutability can be (please correct me if i am wrong), as we can not rewrite commits, we do not need to lock them when pushing code.
Being said all these, I am still confused. What benefits does git get from immutability? I mead why did the architects of git decide to have immutable graph of commits?