Applying a diff file with git

后端 未结 6 1593
一个人的身影
一个人的身影 2021-02-18 20:50

So I was trying to use apply a diff file to my git dev branch. The diff I wanted to apply was this one here: https://github.com/mbabker/joomla-cms/compare/JHtml_move.patch

6条回答
  •  灰色年华
    2021-02-18 21:27

    I had the same issue.

    fatal: git apply: bad git-diff - expected /dev/null on line 96

    Or, if I convert all line-endings to Unix format:

    error: patch failed: :81
    error: : patch does not apply
    ...
    

    git apply --ignore-whitespace .patch worked with Unix line-endings.

提交回复
热议问题