TLDR Web Dev · ARTICLES & TUTORIALS
SERVING A WEBSITE FROM A GIT REPO WITHOUT CLONING IT
Summary from the TLDR Web Dev newsletter
This article describes a method for serving a website directly from a git repository using a modified reverse proxy. The traditional method uses a web server, such as Github Pages, to serve the latest version of the main branch of a git repository. The new method uses git’s internal object structure and a reverse proxy to retrieve content directly from a remote repository on demand. The pros of this are that it’s more efficient than traditional methods and there is no need to maintain a local copy of the repository, while the drawbacks are that it is more complex and requires a deeper understanding of git internals.