gitchat

Commit-Based Chat System using Git

gitchat header

gitchat is a chat application that treats your entire conversation history as a Git repository, leveraging commit messages and file updates to store and version your messages. By containing all chats within a Git repo, you can edit or delete your chat’s history at will, migrate it to any Git-based hosting service, and back it up just as you would any other Git project. That means you can revert, rebase, or otherwise tinker with your chat record whenever you please, because who doesn’t love rewriting history once in a while? It’s simple and private chat.

Our client uses a minimal static HTML page, giving you local control while hooking into Git’s versioning in the background. With the largest Git provider, GitHub, integrated as well, you can easily discover other users by searching their profiles, quickly add them as collaborators, and start a new chat-based repository that’s automatically private and limited to only the participants invited.

gitchat overview

Friend Discovery

We’ve built a lightweight connection to GitHub’s user search, enabling a quick friend-finding feature. Once you spot someone’s profile in the results, you can invite them to a new or existing “gitchat” repository, where they become a collaborator. Under the hood, you’ll see a new repo spin up (for example, gitchat-johnsmith) in your GitHub repositories—each commit represents text, file uploads, or conversation metadata.

Deleting the chat is as simple as deleting the repo from GitHub. If you prefer your own Git server, there’s no limit to the number or size of commits. Just store your conversation and push to your remote like any other project. This local-file approach means you maintain total ownership of your data—no external chat service storing or scanning your messages.

Search for friendsEmbed images and more

Multimedia Uploads

You can push images, audio, video, or any other file under 25MB (GitHub’s recommended file-size limit per upload). If you run a custom Git server or have a more generous limit, you can store bigger files with no problem. This approach even supports Tenor GIF links and YouTube embed codes, letting your repository commits contain references to remote media if you’d rather not commit those bytes directly.

Each media or text snippet updates chat.txt (or whichever file you choose), and is versioned as a typical Git commit. This grants you full control over merges, rebases, or even rewriting commits (like removing confidential info from a chat’s history).

Run Locally

The gitchat project is intentionally just a single static HTML page (plus minimal JavaScript), meaning you can open index.html in your browser, no extra dependencies required. From there, sign in with GitHub or point your script to another git hosting solution. Each chat is tracked by reading/writing commits behind the scenes with an authentication token. For local testing, you can store any “fake” commits in your local repository, or simply rely on an ephemeral mock environment if you prefer.

By chatting with your own Git backend, you always have the final say over your conversation data. You can keep your commits in private repos, branch off side discussions, or even rebase out messages you no longer want. With gitchat’s user search and integration flow, it’s convenient to collaborate or keep conversations entirely self-hosted— all in a single, minimal static page that can even work offline if you point it to a local Git server. This is an ongoing experiment in leveraging version control for everyday communication, and we’re excited to see how others refine the concept further. Feel free to fork, pull request, or otherwise make your mark on the project!

Additional

The only downside to git-based chat is that its not real-time by default. We fix this easily by providing our own SSE server that gets a ping when you push a commit and broadcasts them to all connected clients. This does not send or interact with any messages- it just tells the client to pull the latest commits from the git server. Everything else is handled by git- privately, securely, and real-time. Replace your chat app!