Distributed locking using git tags Hacky way to get distributed locking. I needed parallel runners to claim tasks without two of them starting work on the same one. The task store has no locking, and I didn’t want to host an extra service like Redis. My runners already talk to GitHub, and I can get this locking behavior using an empty repo (creatively called “locks”). The hack uses Git’s built-in atomic operation: creating a ref. If the name exists, the push fails. So a tag named lock-<task-id> is the lock, and whoever creates it holds it.