git am error: “patch does not apply”

前端 未结 7 1975
醉话见心
醉话见心 2021-01-30 02:01

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         


        
7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-30 02:49

    Had several modules complain about patch does not apply. One thing I was missing out was that the branches had become stale. After the git merge master generated the patch files using git diff master BRANCH > file.patch. Going to the vanilla branch was able to apply the patch with git apply file.patch

提交回复
热议问题