My Sourcehut workflow

I've been a big fan of sourcehut ever since I first heard of it, the clean and simple UI and very intuitive UX makes it an awesome alternative to Github, not to mention it's a lot cheaper and is being maintained by open source enthusiasts.

One of the main differences between Github - and most popular Git services - is the handling of contributions. Sourcehut uses patchsets instead of pull requests (or merge requests) which - as the ever enthusiast for simple technologies - I very much prefer. The main tool for handling patchsets is email - more precisely mailing lists. When you create a project in sourcehut you can attach mailing lists to it for discussions, announcements or more relevant to this article, to handle contributions.

I've created a project and a mailing list for demo purposes. (And of course a repository with a simple Hello, World! in Go)
I will not bore anyone with how to do Git stuff, but let's assume I created a new branch (feature/hello-dynamic), implemented the new feature, and pushed two commits:

a939081 feat: Add current time
757427f feat: Add dynamic greeting

To be able to send emails using the Git client it needs to be configured. Again, I won't go into details but there's a nice tutorial over yonder that does a better job than me explaining anyway. Once it's all set up all we have to do is actually send the email:

As the output shows this command will generate an email per commit (in reply to the previous one as seen in the headers):

$ git send-email --suppress-cc=all --to="~barveyhirdman/patchset-demo-devel@lists.sr.ht" 'main..'
/var/folders/9h/ppql50gs71bgnlyf75wxczyr0000gn/T/1PoqGQ5KLs/0001-feat-Add-dynamic-greeting.patch
/var/folders/9h/ppql50gs71bgnlyf75wxczyr0000gn/T/1PoqGQ5KLs/0002-feat-Add-current-time.patch
OK. Log says:
Server: smtp.gmail.com
MAIL FROM:<***>
RCPT TO:<~barveyhirdman/patchset-demo-devel@lists.sr.ht>
From: *** <***>
To: ~barveyhirdman/patchset-demo-devel@lists.sr.ht
Subject: [PATCH 1/2] feat: Add dynamic greeting
Date: Sat,  4 Apr 2026 13:43:35 +0100
Message-ID: <20260404124336.79020-1-***>
X-Mailer: git-send-email 2.51.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

Result: 250
OK. Log says:
Server: smtp.gmail.com
MAIL FROM:<***>
RCPT TO:<~barveyhirdman/patchset-demo-devel@lists.sr.ht>
From: *** <***>
To: ~barveyhirdman/patchset-demo-devel@lists.sr.ht
Subject: [PATCH 2/2] feat: Add current time
Date: Sat,  4 Apr 2026 13:43:36 +0100
Message-ID: <20260404124336.79020-2-***>
X-Mailer: git-send-email 2.51.0
In-Reply-To: <20260404124336.79020-1-***>
References: <20260404124336.79020-1-***>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

Result: 250

We can check our patchset on sourcehut: https://lists.sr.ht/~barveyhirdman/patchset-demo-devel/patches/68699

After a thorough review - assuming everything looks good - the next steps are fairly simple: either export the mbox using the UI and apply it as a patch on main (or whichever branch you want to target) or do it the cool way and use curl (the URL is the list's URL suffixed with /mbox:

curl -s https://lists.sr.ht/~barveyhirdman/patchset-demo-devel/patches/68699/mbox | git am -3

Once that's done, I do an interactive rebase to squash all incoming commits, then push it, change the status and lean back.

Subscribe to Tubular Bytes

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe