Why can’t I git-push to a remote filesystem?

Last edited April 2021

I’d like to not be tied to central hosting platform. I’m using GitHub and GitLab at the moment, but I’d love to host my own Git repos.

I can already host my own web site without running my own web server. I’d like to be able to host my Git repos (read-only) without needing to run a server either.

Because a Git repo is just a bunch of files structured in a certain way, it’d be feasible to write a frontend app that presents the contents of a Git repository in a nice way. It might be necessary to pre-calculate and store derived data for performance reasons. (What about an alternative Git repository format that is optimized for consumption by a frontend-only web UI? )

Making changes to a Git repo (pushing changes) would be more difficult. The filesystem protocols for it exist though; WebDAV is a thing. Git even supported it at some point in the past, but seemingly not anymore.

I want to self-host as little as I can. Self-hosting comes with a security risk (especially if I run things inside my own network) and it comes with additional maintenance.

In general, it feels like the world is dominated by APIs built on top of HTTP yet no common language. Each API needs its own implementation, often per-language. APIs are not discoverable. This is in contrast to filesystems and protocols like HTTP and WebDAV.