I am trying to move several commits from one project to the second, similar one, using git.
So I created a patch, containing 5 commits:
git format-patc
I faced same error. I reverted the commit version while creating patch. it worked as earlier patch was in reverse way.
[mrdubey@SNF]$ git log 65f1d63 commit 65f1d6396315853f2b7070e0e6d99b116ba2b018 Author: Dubey Mritunjaykumar
commit e377ab50081e3a8515a75a3f757d7c5c98a975c6 Author: Dubey Mritunjaykumar Date: Mon Jan 21 23:05:48 2019 +0530
Earlier commad used: git diff new_commit_id..prev_commit_id > 1 diff
Got error: patch failed: filename:40
working one: git diff prev_commit_id..latest_commit_id > 1.diff