7

How to direct the output of the command format-patch to a single file?

Lucas
  • 3,059
  • 5
  • 33
  • 48

2 Answers2

12

--stdout > filename

Jimmy2Times
  • 673
  • 5
  • 11
  • 5
    Be careful of this if you're using Powershell, [as it will cause your patch to be written in UCS-2 encoding which `git apply` doesn't understand](http://stackoverflow.com/questions/13675782/git-shell-in-windows-patchs-default-character-encoding-is-ucs-2-little-endian). – Ian Kemp Jun 27 '16 at 12:49
-1

You can also use git format-patch <branch> --output single.patch

Tachi
  • 489
  • 8
  • 16