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
fatal: git apply: bad git-diff - expected /dev/null on line 47
Yet line 47 reads --- /dev/null. The problem I found was that the line endings were in Windows format instead of UNIX format. Converting the line endings to UNIX format in Notepad++ fixed the problem for me.