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.
Feature requests and bug reports are welcome!
- Check out the branch to which you wish to apply email patches sent via
git send-mail
. - Navigate to your git repository and branch in the terminal.
- Run
git receive-mail
. - Use the arrow keys to move around and the tab key to select/deselect patches.
- Hit Enter.
The patches in the emails will be applied to the currently checked out git branch.
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.
- Windows (via Git Bash)
- Mac
- Linux
- All other platforms that support Golang, Rust, and POSIX shell (since the
project depends on
himalaya
andfzf
, and this version is written in POSIX shell).
- 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.
- Set up
himalaya
with your IMAP credentials by runninghimalaya
. A wizard will walk the user through setting this up. - 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.
- Download the
git-receive-mail
script included herein and put it on on the PATH.
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 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.