Re:I struggled with Git, so I'm making a game to spare other...
by SJC_Hacker on Sunday March 02, 2025 @05:21PM
(#43235858)
There's definitely a local "current state". Its just that there's no inherent concept of a central repository or source of truth.
In practice most people use it as if it does - the remote is "preferred". Which isn't such a bad thing if you know how to use branches and resolve conflicts properly.
Best practice is to create a new branch for each feature, then create a PR into the proper branch.
Early on in development it can be very chaotic as so much code is changing so quickly. No revision system is going make up for a lack of communication and division of responsibilities.
You could make the mental model easier to understand by centralising the state and switch to pessimistic locking instead of optimistic. But then you'd have to live with the downsides of those, like git's predecessors.