75

I'm trying to send patches with the git send-email But I get the following error:

git: 'send-email' is not a git command. See 'git --help'.

How to make git send-email works ?

Related links:

http://www.kernel.org/pub/software/scm/git/docs/git-send-email.html

parsley72
  • 8,449
  • 8
  • 65
  • 98
MOHAMED
  • 41,599
  • 58
  • 163
  • 268
  • Which version of git are you using? do you have the right 'minus' sign (if you have any internationalization) – Philip Oakley Dec 06 '12 at 15:12
  • How did you install git? What OS are you using (and if Linux what distribution)? – qqx Dec 06 '12 at 15:13
  • try `git-send-email` and see if that is found. – Philip Oakley Dec 06 '12 at 15:26
  • See also: full setup info (my own Q&A): [How to configure and use `git send-email` to work with gmail to email patches to developers](https://stackoverflow.com/a/68238913/4561887) – Gabriel Staples Jul 03 '21 at 18:49
  • In my case, I installed `git-email` but it didn't work because I have a `nix-env` `git` installed which has precedence over the system `git` in my `$PATH`. Removing the `nix-env` version solved the issue. – Nahua Kang Jan 11 '23 at 14:43

1 Answers1

117

You need to install the git-email package for it to work.

On Ubuntu, the usual apt-get install git-email works fine. I can confirm the same for Fedora as well (yum install git-email).

cebewee mentions the rationale in the comments:

Linux distributions often like to split up packages to avoid dependencies needed only by optional functionality (like send-email).

Note that you have to configure it before starting.

Community
  • 1
  • 1
axiom
  • 8,765
  • 3
  • 36
  • 38