About

There is an ecosystem of tools to enable git code collaboration over nostr using nip34. gitworkshop.dev, ngit and git-remote-nostr are tightly-coupled examples maintained by DanConwayDev and there are others such as gitplaza, gitstr and song.

The Need

git is a decentralized version control system, yet most freedom tech projects use centralized walled gardens on top of git as a social and collaboration layer for code changes

the most popular is Microsoft's GitHub, and like most big tech companies, it has a history of banning accounts (and repositories) without warning. this creates a real risk of disruption for important projects like bitcoin-core

The Opportunity

whilst alternatives do exist, nearly all of them involve moving to another walled garden, either controlled by a different centralized guardian, or self-hosted which is less suitable for an anarchic project

some projects use patches-over-email: an alternative and decentralized approach that pre-dates GitHub. despite its antiquated tooling, it has a very smooth and effective workflow for those that use it regularly and has proven to scale to very large projects like the linux kernel

ultimately, GitHub remains by far the most popular choice for freedom tech projects. the accessible UX, convenience, inter-connected tooling and network effect are just a few of the reasons

nostr is the ideal permissionless, decentralized, and censorship resistant social layer for the anarchic FOSS code collaboration use case

there is an opportunity to build modern tooling that competes from a UX perspective and has the additional benefit of integrating into a wider social ecosystem

The Philosophy

ngit and gitworkshop.dev's philosophy can be summed up as:

  • let git be git - don't try and reinvent git
  • let nostr be nostr - leverage the benefits of nostr
  • learn from the success of others - eg. the PR model has proved to be very popular. how can we enable similar experiences with patches?

patch-over-email, with its proven scalability, lays the foundation for providing this social layer without having to re-invent the complexities of creating an efficient alternative to git server over nostr, or use specialized relays

The Solution

nip34 is a nostr protocol for sending git patches over nostr, similar to how patches are sent via email using `git format-patch` and `git send-email`. the patches-over-email model has proven to be a robust workflow that is used extensively, including in very large projects such as the linux kernel

git-remote-nostr, ngit and gitworkshop.dev implements optional features of nip34, which enable:

  • patches to be managed as branches, similar to GitHub PRs
    • Open and Draft PRs become branches with the prefix pr/
    • the PR author and maintainers can add new commits can using git push
    • commits can be rebased, updated or replaced using git push --force or ngit send --in-reply-to nevent123...
    • with ngit - author pgp signatures and therefore the original commit ids can be retained
    • features can be 'merged' using a 'merge commit' so that a series of feature commits can remain distinct rather than each applied to the main branch directly
  • support multiple maintainers for a repository and a pathway to smoothly transition maintainership when a maintainer moves on
  • the repository state is stored in nostr events, reducing the required trust for git servers

FAQs

You're not replacing GitHub, you're still using GitHub as a git server

it is trivial to switch git servers as they all operate with the exact same protocol. changing the social layer requires a social and UX shift which can be challenging, disruptive and timeconsuming

Are you trying to replicate / replace Github?

no. GitHub is a very large product with a lot of features which don't meet the goal of freedom tech code collaboration

we are specifically looking to address the needs of anarchic FOSS freedom tech products

Enhancements

got ideas? please share them and lets explore as a community

gitworkshop.dev logo GitWorkshop.dev