我需要知道 Textmate 和 SVN 使用什么行结尾设置
我使用 Textmate(全新用户)作为我选择的编辑器。今天我做了 svn diff somefile 并发现 svn 认为我更改了整个文件!
在Textmate中,我去了Textmate ->首选项->高级->保存并将行结尾设置为 LF(推荐)。文件编码设置为 UTF8(推荐)。
我猜这是正确的设置,但我真的不知道。不管怎样,这是一件大事,因为我的项目变化得非常快,而且这是一个庞大的项目……数千个文件。
I am using Textmate (bran new user) as my editor of choice. Today I did svn diff somefile and found that svn thinks I changed the entire file !
In Textmate, I went to Textmate -> Preferences -> Advanced -> Saving and Set Line Endings to LF (recommended). File Encoding is set to UTF8 (recommended).
I guessed that this was the correct setting but I really don't know. Anyway, this is a big deal because my project gets changed a LOT very fast and it is a massive project...thousands of files.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
SVN 并不关心您的文件使用什么行结尾,它只是警告您它们已更改。
我的猜测是,大部分源代码要么是用基于 Windows 的编辑器 (CRLF) 编写,要么是用 OSx 之前的编辑器 (CR) 编写。除非你的项目是针对 Mac 的,否则我会选择第一个。
SVN does not care what line endings your files use, it just warns you that they changed.
My guess would be that most of the source code is either written in a Windows based editor (CRLF) or in a pre-OSx editor (CR). Unless your project is Mac-specific I'd bet on the first one.