Error: NUL byte in commit log message not allowed

I am trying to commit some files in my Git repository and I am getting this error.

It all started when I ran git rm -rf folderand git rm -rf fileand tried to commit the changes. Since then, I was able to commit and click without deleting these files from my remote repository, but now I'm completely stuck.

Full error:

error: a NUL byte in commit log message not allowed.
fatal: failed to write commit object

What can I do to fix this? My google foo let me down on this.

Edit:

I just checked these deleted files and tried to commit again, but still gave me the same error. Was my Git repository damaged or something else?

+4
source share
5 answers

, . , , iTerm2 ... . git commit, ... DID. , , , , , .

+4

, - NULL , Git . , : git commit -m "My brilliant commit message"

+4

. PowerShell script, Out-File, (- snarfing svn-), git. Encoding Out-File ASCII .

Invoke-Expression "svn log -r $rev $repoPath" | Out-File -Encoding ASCII commit.txt
git commit -F commit.txt
+1

, , (\n = > \r\n, )

, .

, plnkr, , plnkr. . ,

+1

, commit; ; , , .

MORAL OF THEORY. , , , ; - , ,

0

All Articles