Instead of referring to the existing functionality "git", let's call this hypothetical example "git+".
Here's the concept:
+ a remote filesystem stores the files of a git+ repository (e.g. cloud Bucket accessed via rsync/rclone)
+ each git+ client contains extra functionality from a normal "git" server, including functionality from the "--bare" option, but runs entirely on the client (or as a cloud function).
+ the first step of every git+ process would be to create a .LOCK file, that prevents other users from writing concurrently to the repository. Once completed, a git+ process deleted the .LOCK file and allow other writes.