SVN diff 命令 - 忽略 BOM
我使用 SVN 来提交 Windows 和 Linux 中的更改,但是当我想在某些情况下提交更改时,会在文件中添加/删除 BOM 字符。 我希望 SVN 的 diff 会忽略 BOM 的更改,并仅显示我已更改的文件。 您知道会忽略 BOM 字符的 diff 命令吗?
谢谢。
I'm using SVN in order to commit changes in windows and linux, but when I want to commit changes in some cases a BOM characters is added/ remove from files.
I want that the diff of SVN will ignore this changes with BOM and will show me only the files I have changed.
Do you know a diff command that will ignore BOM characters?
thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该将编辑器配置为不发出 BOM 字符。如果您使用正确的编码 (UTF-8),则它既不需要也没有用。
You should rather configure your editors not to emit a BOM character. If you're using a proper encoding (UTF-8), it's neither needed nor useful.
好吧,你没有提到你所在的平台,但如果你使用的是 Windows,Beyond Compare 有相当多的功能良好的BOM处理能力,可以与SVN集成。
Well, you didn't mention what platform you are on, but if you are on Windows, Beyond Compare has pretty good handling of BOM and can be integrated with SVN.