gitformat-patch

Why git format-patch silently fails?


I am issuing these:

git format-patch 2f3e744 2f3e744^ 

or

git format-patch 2f3e744..3e853

In the latter, 3e853 is a commit earlier than 2f3e744.

Neither command resulted in some change (not the result I was expecting).

My goal is to make a patch based on changes from revision 3e853.


Solution

  • You're subject is actually wrong. You're command line is not providing that, it's providing ^2f3e744 3e853, which excludes your commit. The proper way to write this is git format-patch 3e853..2f3e744. You could also do:

    The git rev-list docs are a good resource for this information.

    Update: You're title changed, it's the first example now. And it may not be producing anything because your history is short. I'd expect the first command to emit a patch for everything up to 2f3e744.