~skin/git-receive-mail

The People's Git Email Patch Tool

497a64f Demo gif

a month ago

c21f734 Fix up README

a month ago

#git-receive-mail: The People's Git Email Patch Tool

This project attempts to make it dead simple for mere mortals to consume git patch emails. It aims to be The People's git email patch tool.

Just run git receive-mail, pick the patches you want, and they are automatically applied to the current branch.

Demo of git receive-mail

Feature requests and bug reports are welcome at this project's issue tracker.

Patches may be sent and discussed at the project's mailing list.

#Usage

  1. Check out the branch to which you wish to apply email patches sent via git send-mail.
  2. Navigate to your git repository and branch in the terminal.
  3. Run git receive-mail.
  4. Use the arrow keys to move around and the tab key to select/deselect patches.
  5. Hit Enter.

The patches in the emails will be applied to the currently checked out git branch.

#Goals and Non-Goals

Goals:

  • Support the masses.
    • Usable on pretty much any OS.
    • Permissively licensed (MIT).
  • No dependencies on specific email workflows.
  • Simple to use in most cases, possible to use in all cases.

Non-Goals:

  • The ability for maintainers of popular projects to consume vast numbers of patches. Other projects exist for that, such as aerc and b4.
  • The ability for patch submitters to participate on a mailing list. That is, this tool does not make it easy to reply to plain-text emails with plain text, something many email providers don't provide. However, there is hope! Users can use himalaya as a for-purpose tool to send plain text emails. This allows the users to use whatever they normally use to check email for everything else.

#Supported OS's

  • Windows (via Git Bash)
  • Mac
  • Linux
  • All other platforms that support Golang, Rust, and POSIX shell (since the project depends on himalaya and fzf, and this version is written in POSIX shell).

#Set-Up

  1. Install himalaya. It can be downloaded from its releases page. Often, this can simply be installed with your favorite package manager, either the system package manager or e.g. homebrew.
  2. Set up himalaya with your IMAP credentials by running himalaya. A wizard will walk the user through setting this up.
  3. Install fzf. It can be downloaded from its releases page. Often, this can simply be installed with your favorite package manager, either the system package manager or e.g. homebrew.
  4. Download the git-receive-mail script included herein and put it on on the PATH.

#Advanced Usage

The script passes whatever arguments sent to it into Himalaya, so reading the documentation for that tool will enable the user to construct more advanced workflows, grab patches from folders other than their INBOX, etc. For example, git receive-mail -a <account> lets the user grab the email from a specific email account.

#Contributions

Contributions welcome. I don't expect this to remain a POSIX script; I'm open to PRs or patches that rewrites this simple script. Future directions might include getting rid of dependencies or rewriting entirely in golang or Python.