我正在嘗試閱讀檔案,但我不明白。有人可以用簡單的話解釋一下 gitattributes 檔案的作用嗎?
uj5u.com熱心網友回復:
它定義了由通配符模式(例如*.txt)和附加屬性定義的檔案的型別(文本、二進制),例如如何合并這些檔案或者它們的行尾是否應該被規范化。
例如,您可能有一個.gitattributes檔案:
*.txt text
*.sh text eol=lf # force LF newlines on GNU Linux shell scripts
*.bat text eol=crlf # force CRLF newlines on Windows batch files
*.jpg -text # JPG files are not text
*.png -diff # PNG files cannot be diffed
*.gif -text -diff -merge # GIF files are not text, cannot be diffed and cannot be merged
*.ogg binary # equivalent to -text -diff -merge
https://git-scm.com/docs/gitattributes上的完整檔案
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/510509.html
標籤:GitLab Collective 混帐githubGitLabgitlab-cigithub-动作
上一篇:如何在具有多個用戶的服務器上執行“gitpull”時更改ssh密鑰?
下一篇:關于拉取請求的初學者Git問題
