# Formated patches

### Rationale

* Export the change in Unix mailbox format
* Can do certain setup so that everytime it's generated, it will be automatically emailed
* Include the diff and commit messages
* One file per commit by default

### Command

* `git format-patch <commit-1>...<commit-2>` for a range of commit
* `git format-patch -l <commit>` for single commit
  * If `-l` is ommited, it will get the range to `HEAD`
* `git format-patch <branch>` for between the diverge point with a different branch to the current `HEAD`
* with `-o <output-dir>` will save the files to a destination
* with `--stdout > output.patch` will save a single file
