gitformat-patch

How to use git format-patch on initial commit


I need to get patch file for inital commit (which is not empty) for our review process, but I'm confused as git format-patch command only makes it from branch that is on initial commit not including it.

Seems it must be some obvious move but I'm completely missing it.


Solution

  • Try git format-patch --root $SHA (where $SHA is that first commit)