【发布时间】:2017-01-09 04:35:25
【问题描述】:
我做了一些小改动,但 github 显示了整个文件的差异。我怀疑这是由缩进或 default_line_ending 引起的。
奇怪为什么会发生这种情况,我的项目中已经有了 .editconfig。这是设置。我正在使用 sublime text 3。
root = true
[*]
# Change these settings to your own preference
indent_style = space
indent_size = 4
charset = utf-8
max_line_length = 120
# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
【问题讨论】:
-
是的,这很可能是由加衬结尾引起的。也许您的 Git 在签入/签出期间正在更改(或不更改)行尾。或者,它可能是您的文本编辑器。
标签: git github sublimetext3