git am: Patch format detection failed

前端 未结 2 1814
我在风中等你
我在风中等你 2021-02-13 09:49

I have never used patches with Git before and I need some help. I am trying to apply a patch to a Git repo to test a Wine patch, specifically this patch here. So I did the follo

2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-13 10:27

    Use below command: patch -p1 < patch_file_name.patch

    • You will be asked to specify "File to patch", mention complete path /
    • Assume -R [n]: n
    • Apply anyway? [n]: y

    Do for all files present in you patch.

    • If any merge conflict occurs then check the conflict in ".rej" file which has been generated and resolve & apply those changes.
    • do "git add " and "commit" your changes.

提交回复
热议问题