标记为二进制类型的文件

我正在对我的一个文件执行 svn diff操作,svn 检测到它是一个二进制类型。该文件是可读的纯文本,我希望能够得到这个文件的差异。我如何告诉 SVN 这不是一个二进制文件?

Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
40865 次浏览

You can use the Subversion property svn:mime-type to set an explicit mimetype on the file:

svn propset svn:mime-type 'text/plain' path/to/file

Alternatively, you can delete this property (since Subversion assumes plaintext, otherwise) using:

svn propdel svn:mime-type path/to/file

You can get diff even for a file marked as binary by using --force.

svn diff --force path/to/file