In praise of git-request-pull


I'm a big enemy of Github monoculture, but I feel like many of the alternatives for project collaboration and communication are somewhat lacking. Using services like Gitea[0] or Gitlab[1] provide a familiar Github-like experience, but inherit a lot of its downsides, including requiring account creation to submit patches and being enormously complex pieces of software that are challenging to self-host. Git-send-email[2] requires somewhat arduous IMAP setup and can be fiddly to get right the first few times. It often requires a custom email client to set up a proper workflow.


The personal approach that has worked best for me is to self-host a personal fork of stagit, a simple and easy to maintain program that generates static HTML files from a git repo, and encourage anyone who hasn't set up git-send-email to use an underrated git command: git-request-pull.


https://git-scm.com/docs/git-request-pull


Git request pull is a simple decentralized way to handle changes across projects. Basically: you "fork" any project you want to collaborate on, and host it on whatever git host you like (even Github!). Then you make your changes, and run a command that builds a plain text summary. For example, here would by my request to merge my (somewhat sloppy) changes to stagit into the upstream repo:


$ git request-pull 1.1 git://git.alexwennerberg.com/stagit

The following changes since commit a8a5e9c3b37e133d26fe3ea5cd361281d7a56c85:

  bump version to 1.1 (2022-04-02 17:35:47 +0200)

are available in the Git repository at:

  git://git.alexwennerberg.com/stagit

for you to fetch changes up to bcfc801dd6f617115c340370e14324cce4f3b42f:

  add special styl efor readme (2022-04-23 23:26:22 -0700)

----------------------------------------------------------------
alex wennerberg (7):
      Add readme.txt
      Add raw file link
      change README to markdown
      Add libcommonmark
      cleanup readme
      fix makefile
      add special styl efor readme

 Makefile            | 10 ++++++----
 README => README.md | 11 ++++++++---
 stagit.c            | 50 +++++++++++++++++++++++++++++++++++++++++++-------
 3 files changed, 57 insertions(+), 14 deletions(-)
 rename README => README.md (96%)

This is just a block of text -- I can then send it to the repo owner via email, chat, or any other method to alert them to review and merge in my changes. If I'm looking for a more detailed code review with comments, I can use the -p flag to include the diff, that they can add in-line comments to. The repo owner can then add my fork as a remote and checkout / merge any changes.


This workflow gets me everything I need for relatively small project collaboration, especially in conjunction with a "public inbox" style mailing list[4], with a fraction of the infrastructure and effort. I encourage you to experiment with it and try using git-request-pull as a collaboration tool in your projects. Let me know what you think!


----------


[0] git-send-email

[1] Gitea

[2] Gitlab

[3] my stagit fork

[4] e.g. with crabmail, a piece of software I built for this purpose



/gemlog/