The Five-Second Tax on Every Git Push

giteadevopsself-hostedgit

Every git push to GitHub costs me between five and ten seconds. I caught myself reaching for my phone during a push one afternoon and I measured. Five seconds doesn’t sound like a lot, and yet it’s enough to break the thread you were holding in your head.

A local Gitea instance pushes in under a second. Same repository, same branch, same commit. The difference isn’t what GitHub does with the push — it’s where GitHub is.

Where do the seconds go

A git push isn’t a single operation. It’s a conversation between the client and the server — they negotiate refs, agree on what needs transferring, send the pack, and confirm the update. Each of those steps is a network round trip.

GitHub’s git infrastructure sits primarily in the US. From Europe, each round trip adds roughly 100–150 milliseconds of latency. Multiply that by the half-dozen exchanges in a typical push, add the actual data transfer time, and you land squarely in that five-to-ten-second window. It’s not that GitHub is doing anything wrong — it’s physics. Data takes time to cross an ocean and come back.

A Gitea instance on the local network has sub-millisecond round trips. The entire push completes before I normally look away from the terminal.

The setup

The Gitea server sits on a machine on the local network. Developers push there. Gitea mirrors every push to GitHub automatically using its built-in push-mirror feature. CI runs through Gitea Actions with self-hosted Gitea runners — and staying switchable means self-hosted runners are a good idea anyways, even on GitHub.

GitHub becomes the backup and the public face. The daily work happens locally.

What you get

Reduced context-switch friction. Twenty pushes a day for ten developers, each saving somewhere between five and ten seconds — that adds up to roughly 1,000 to 2,000 seconds a day across the team. The real cost, though, was never the raw seconds. A five-second wait is just long enough to glance at Slack, read half a message, and lose the mental model you were carefully holding. A sub-second push keeps you in the code. The productivity gain lives in the focus you don’t lose, not the time you save.

Server-side hooks that GitHub doesn’t offer. On github.com, you cannot run custom code that decides whether a push gets accepted or rejected — status checks and scanning only run after the code is already in the repository. With Gitea, you can write a pre-receive hook that scans every incoming commit for secrets (AWS keys, database passwords, API tokens) and rejects the push before the credential ever enters the repo history. On GitHub, if someone accidentally commits a secret, the push succeeds, secret scanning alerts you after the fact, and now you’re rotating keys and rewriting git history. With a Gitea pre-receive hook, the credential never lands. That’s not a workflow convenience — it’s a fundamentally different security posture.

GitHub outage independence. GitHub has had significant outages over the years. When the development workflow depends entirely on a remote service, an outage means the team stops pushing, stops reviewing, stops merging. With a local Gitea instance, GitHub going down doesn’t affect development velocity at all. The mirror catches up when GitHub recovers.

Cost at scale. GitHub Teams pricing grows per seat. Gitea is free — unlimited users, unlimited repositories, unlimited organizations. The CI runners you provision are yours, sized to the workload rather than to a pricing tier. At ten developers the difference is modest; at fifty it becomes a real budget line item.

Resource efficiency. Gitea is a single Go binary. It runs comfortably on hardware you’d hesitate to call a server (four cores, eight gigabytes of RAM, an SSD). A machine like that serves teams of fifty or more without breaking a sweat. The CI runners are the scaling bottleneck, not the git server.

Network traffic stays local. In an office environment, all git operations stay on the LAN. No bandwidth consumed for pushes and fetches, no data leaving the building until the mirror syncs to GitHub in the background.

The dark side

This isn’t free, and it’s worth being honest about the costs.

You own the operations. Backups, availability, security patching, access control, audit logging — all of it is on you now. GitHub handles these things invisibly; when you run Gitea, a disk failure without backups means lost repositories, and a missed security patch means an exposed service. For a team that already has DevOps capacity, this is routine work. For a team without it, this is a new, non-optional responsibility.

Branch protection and code review workflows. Gitea supports branch protection rules, required reviews, and status checks. The ecosystem, however, is thinner than GitHub’s. CODEOWNERS files, fine-grained permission models, Dependabot, security advisories — if the team depends on these, migrating means either finding Gitea equivalents or accepting gaps. The larger the team, the more those gaps matter.

Availability. A single Gitea server is a single point of failure. For a small team, scheduled maintenance windows are perfectly manageable. For larger teams working across time zones, you start needing redundancy — replication, load balancing, and the operational complexity that comes along with them. A single Gitea instance on reasonable hardware serves fifty developers comfortably, and beyond that you’re looking at sharding or high availability setups that require dedicated DevOps effort to maintain.

If a larger team wants the full set of features and the reliability they’ve come to expect from a managed platform, they’ll need to invest real DevOps time into it. That’s not a criticism of Gitea — it’s the nature of running infrastructure instead of renting it.

On sovereignty

One thing worth being precise about: switching from GitHub to Gitea is not sovereignty in itself. It’s a provider swap. Sovereignty is the ability to switch — from one provider to another, or to something else entirely, whenever the need arises. Using standard git protocols, keeping CI configuration portable, avoiding deep dependencies on features that only exist in one platform — that’s what gives you the freedom. The tool you choose today matters less than whether you can choose differently tomorrow.


Curious what a local Gitea setup looks like in practice, or thinking about designing one for your team? Get in touch. Happy readings!