6

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

Lucas
  • 2,967
  • 5
  • 31
  • 45

2 Answers2

10

--stdout > filename

Jimmy2Times
  • 643
  • 5
  • 11
  • 4
    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
  • 173
  • 3
  • 8