For example, let's focus on the latest 4 successive commits. commit1 is the latest while commit4 the earliest:
commit1 HEAD
commit2
commit3
commit4
...
I want get patch file from commit1&2&3. I have tried the following two commands, but they generates different patch files:
git diff commit4 commit1 -- > file.patch
git format-patch -3 commit1 --stadout > file.patch
I want to know if the difference is crucial? Could I use any of them?