回答
它基本上禁用eol
根據documentation:
有時候你需要重寫一個屬性的設置爲 路徑未指定狀態。這可以通過列出前綴爲感嘆號的 屬性的名稱來完成!
eol
執行以下操作:
該屬性設置在 工作 目錄中使用的特定行結束樣式。它可以在沒有任何內容檢查的情況下啓用行結束標準化,從而有效地設置文本屬性。
短版:
如果Git的決定內容是文本,它的行結束標準化爲LF上籤。 恢復某些嵌套的.gitattributes文件中的任何顯式eol設置。
參見man gitattributes
:
Each line in gitattributes file is of form:
pattern attr1 attr2 ...
Sometimes you would need to override an setting of an attribute for a path to
Unspecified state. This can be done by listing the name of the attribute
prefixed with an exclamation point !.
text
This attribute enables and controls end-of-line normalization. When a text
file is normalized, its line endings are converted to LF in the
repository. To control what line ending style is used in the working
directory, use the eol attribute for a single file and the core.eol
configuration variable for all text files.
Set to string value "auto"
When text is set to "auto", the path is marked for automatic
end-of-line normalization. If Git decides that the content is text,
its line endings are normalized to LF on checkin.
eol
This attribute sets a specific line-ending style to be used in the working
directory. It enables end-of-line normalization without any content
checks, effectively setting the text attribute.
* text=auto !eol
意味着:
- 沒有EOL(線結束)轉換爲將二進制文件來執行。
- 爲文本文件,EOLS都在檢查出該文件轉換爲依賴於操作系統的EOL(轉換到LF Unix和CR + LF適用於Windows)和,而在檢查與LF替換。
GIT中有2個屬性是處理結束行:
- 文本
文件說:
該屬性啓用並控制行結束標準化。當一個文本文件是標準化的,它的行結束轉換爲LF在倉庫中
這實際上意味着,當你承諾回購,它會轉換行結束到LF
- EOL
文件說:
該屬性將在工作目錄中使用的特定行結束樣式。它可以在沒有任何內容檢查的情況下啓用行結束標準化,從而有效地設置文本屬性。
因此,儘管文本屬性影響的文件將如何看起來像回購,eol
影響文件看起來像在工作目錄。現在
,屬性可具有4種狀態:
組沒有值
例如:* text
未設置
例如:* -text
組具有特定值
例如:* text=auto
unspeci田間
例如:* !text
所以,* text=auto !eol
含義:
所有文件屬性文字設置爲auto和EOL屬性不明。閱讀文檔,我們發現text = auto意味着你讓git決定一個文件是否爲文本,如果是的話,它會對它進行標準化(將回車中的行尾設置爲LF)。
!eol
意味着屬性EOL設置爲未指定明確。在這種情況下,它與完全不指定它相同,指示Git查看core.eol配置設置,以瞭解如何處理工作目錄中的行尾。請注意:
core.eol配置變量控制Git將用於工作目錄中規範化文件的行結束符;默認情況下,將使用以您的平臺結束的本地行,如果core.autocrlf已設置,則使用CRLF。
但是你可以使用EOL在下面這樣的情況:
* text=auto eol=CRLF
test.txt !eol
基本上覆蓋了EOL屬性從CRLF到不明爲test.txt的。這意味着對於除test.txt之外的所有文件,Git會在檢出EOL時將其轉換爲CRLF,但不會對test.txt執行任何操作。線(合理猜測)的
- 1. gitattributes中的`* text = auto eol = lf`會怎樣?
- 2. 什麼是推薦的gitattributes設置?
- 3. git EOL是否改變了相反的方式? (儘管.gitattributes)
- 4. Rails 2.3的EOL(End of Life)是什麼?
- 5. 由於gitattributes覆蓋未提交的提交eol設置
- 6. ParseKit不符合我的EOL符號:我做錯了什麼?
- 7. 爲什麼EOL錯誤,是什麼意思?
- 8. 這段代碼中的IEventRepository是什麼? Resolver.resolve()是做什麼的?
- 9. 什麼是簡單的JavaScript做什麼
- 10. 什麼「?」做?什麼是__FILE__?
- 11. 什麼是setDetailItem:做什麼?
- 12. .gitattributes:做文字=汽車仍使用core.autocrlf檢查出的文本文件時檢測到EOL
- 13. devtools包中的bash是做什麼的?
- 14. d3.js中的zoom.scaleExtent()是做什麼的?
- 15. 'FOO = $ {BAR:-localhost}`中的':`是做什麼的?
- 16. DrScheme中的'parametrize'是做什麼的?
- 17. Rspec中的#equal_set是做什麼的?
- 18. Mozilla的JavaScript中`=>`是做什麼的?
- 19. Python中的`import _preamble`是做什麼的?
- 20. redis中的ping()是做什麼的?
- 21. NHibernate中的Configuration.AddAssembly(「」)是做什麼的?
- 22. Uncrustify中的「Force」是做什麼的?
- 23. xamarin中的TabbedRenderer是做什麼的?
- 24. ceil(double)中的「double」是做什麼的?
- 25. Django代碼中的'_'是做什麼的?
- 26. `PHP.ini`中的`session.entropy_length`是做什麼用的?
- 27. $(「#id」)[0]中的[0]是做什麼的?
- 28. sed中的\ 1是做什麼的?
- 29. VBA中的$符號是做什麼的?
- 30. PL/SQL中的「/」是做什麼的?
EOL =端。 '!eol'最有可能與* * *行尾有關。 –